syncReadLine(): actually enforce buffer size limits.

This commit is contained in:
antirez
2014-10-16 17:35:11 +02:00
parent b699c8ea63
commit 3b6706848b

View File

@ -139,6 +139,7 @@ ssize_t syncReadLine(int fd, char *ptr, ssize_t size, long long timeout) {
*ptr = '\0'; *ptr = '\0';
nread++; nread++;
} }
size--;
} }
return nread; return nread;
} }