Commit f7036933 authored by antirez's avatar antirez
Browse files

syncReadLine(): actually enforce buffer size limits.

parent 5ee2ccf4
...@@ -139,6 +139,7 @@ ssize_t syncReadLine(int fd, char *ptr, ssize_t size, long long timeout) { ...@@ -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;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment