exclude: Try another fix for NULL termination.

Hopefully Coverity understand this better.

CID: #996807
This commit is contained in:
Andreas Schneider 2013-07-30 10:42:15 +02:00
parent b3bf209ca0
commit 7247eed4ac

View file

@ -98,12 +98,12 @@ int csync_exclude_load(CSYNC *ctx, const char *fname) {
rc = -1;
goto out;
}
memset(buf, 0, size + 1);
if (read(fd, buf, size) != size) {
rc = -1;
goto out;
}
buf[size] = '\0';
/* FIXME: Use fgets and don't add duplicates */
entry = buf;