settings: coverity - possible buf overflow
This commit is contained in:
parent
b2913639c4
commit
bc1d444ed9
1 changed files with 2 additions and 1 deletions
|
@ -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]) {
|
||||
|
|
Loading…
Add table
Reference in a new issue