Skip to content
Permalink
Browse files

Merge pull request #2 from josealf/master

Fix bug - buf must be null terminated
  • Loading branch information...
oboroc committed Aug 13, 2015
2 parents 86df2e1 + 5a1cb04 commit 4a489819aa564671dc71b9f5bbd3225f62852ecb
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/bdecli.c
@@ -572,8 +572,10 @@ int bde_cfg_add_entry(bde_entry_t *list, char *szFQNPath, char *szName, char *sz
return 0;
}

if ('\\' == tmp[i])
if ('\\' == tmp[i]) {
strncpy_s(buf, MAX_BUFFER, tmp, i);
buf[i] = 0;
}
else
strcpy_s(buf, MAX_BUFFER, tmp);

0 comments on commit 4a48981

Please sign in to comment.
You can’t perform that action at this time.