From 1586b39138a56717a92d9ef7af3f521d54f8accc Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 23 Sep 2009 07:22:17 +0530 Subject: Don't ignore retval of read() in reqs.c --- src/reqs.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/reqs.c') diff --git a/src/reqs.c b/src/reqs.c index 2f682b3..704f085 100644 --- a/src/reqs.c +++ b/src/reqs.c @@ -766,8 +766,16 @@ static int pull_client_data (struct conn_s *connptr, long int length) if (len < 0 && errno != EAGAIN) goto ERROR_EXIT; - if (len == 2 && CHECK_CRLF (buffer, len)) - read (connptr->client_fd, buffer, 2); + if ((len == 2) && CHECK_CRLF (buffer, len)) { + ssize_t ret; + + ret = read (connptr->client_fd, buffer, 2); + if (ret == -1) { + log_message + (LOG_WARNING, + "Could not read two bytes from POST message"); + } + } safefree (buffer); return 0; -- cgit v1.2.3