Skip to content

Commit

Permalink
Use bstrncpy and not strncpy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent 93d959a commit 5cdcf76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dird/inc_conf.c
Expand Up @@ -394,7 +394,7 @@ static void scan_include_options(LEX *lc, int keyword, char *opts, int optlen)
*/
for (i = 0; FS_options[i].name; i++) {
if (FS_options[i].keyword == keyword && bstrcasecmp(lc->str, FS_options[i].name)) {
strncpy(option, FS_options[i].option, sizeof(option));
bstrncpy(option, FS_options[i].option, sizeof(option));
i = 0;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ini.c
Expand Up @@ -521,7 +521,7 @@ bool ini_store_name(LEX *lc, ConfigFile *inifile, ini_items *item)
if (lex_get_token(lc, T_NAME) == T_ERROR) {
return false;
}
strncpy(item->val.nameval, lc->str, sizeof(item->val.nameval));
bstrncpy(item->val.nameval, lc->str, sizeof(item->val.nameval));
scan_to_eol(lc);
return true;
}
Expand Down

0 comments on commit 5cdcf76

Please sign in to comment.