fix bug spotted by clang

SVN revision: 83016
This commit is contained in:
Gustavo Sverzut Barbieri 2013-01-20 14:25:11 +00:00
parent 1486f40f9b
commit 8d2b64ed3b
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ plungefile(char *name, int try_currentpath, int try_includepaths)
strncpy(path, ptr, sizeof path);
path[sizeof path - 1] = '\0'; /* force '\0' termination */
strncat(path, name, sizeof(path) - strlen(path));
strncat(path, name, sizeof(path) - strlen(path) - 1);
path[sizeof path - 1] = '\0';
result = plungequalifiedfile(path);
} /* while */