syncReadLine(): actually enforce buffer size limits.

This commit is contained in:
antirez
2014-10-29 14:26:47 +01:00
parent b699c8ea63
commit 3b6706848b
+1
View File
@@ -139,6 +139,7 @@ ssize_t syncReadLine(int fd, char *ptr, ssize_t size, long long timeout) {
*ptr = '\0';
nread++;
}
size--;
}
return nread;
}