error messages

This commit is contained in:
Axel Kittenberger 2008-12-05 23:46:26 +00:00
parent cfd444f361
commit 24d027e0b7
1 changed files with 2 additions and 0 deletions

View File

@ -841,10 +841,12 @@ bool buildpath(char *pathname,
{
int len = builddir(pathname, pathsize, watch, prefix);
if (len < 0) {
printlogf(LOG_ERROR, "path too long!");
return false;
}
if (dirname) {
if (pathsize < len + strlen(dirname) + 1) {
printlogf(LOG_ERROR, "path too long!");
return false;
}
strcat(pathname, dirname);