Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
settings: coverity - possible buf overflow
  • Loading branch information
perexg committed Oct 3, 2014
1 parent b291363 commit bc1d444
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.c
Expand Up @@ -502,7 +502,8 @@ makedirs ( const char *inpath, int mode )

x = 1;
ok = 1;
strcpy(path, inpath);
strncpy(path, inpath, sizeof(path)-1);
path[sizeof(path)-1] = '\0';
while(ok) {
ok = path[x];
if (path[x] == '/' || !path[x]) {
Expand Down

0 comments on commit bc1d444

Please sign in to comment.