mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
snprintf instead of sprintf
This commit is contained in:
parent
634c80490a
commit
e94d5035f0
1 changed files with 2 additions and 2 deletions
|
|
@ -1492,10 +1492,10 @@ rcxml_read(const char *filename)
|
|||
line = NULL;
|
||||
len = 0;
|
||||
if (filename) {
|
||||
sprintf(rcxml, "%s", filename);
|
||||
snprintf(rcxml, sizeof(rcxml), "%s", filename);
|
||||
i = 0;
|
||||
} else {
|
||||
sprintf(rcxml, "%s/rc.xml", config_dir_n(i));
|
||||
snprintf(rcxml, sizeof(rcxml), "%s/rc.xml", config_dir_n(i));
|
||||
}
|
||||
/* Reading file into buffer before parsing - better for unit tests */
|
||||
stream = fopen(rcxml, "r");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue