diff options
author | Mukund Sivaraman <muks@banu.com> | 2009-09-23 07:22:17 +0530 |
---|---|---|
committer | Mukund Sivaraman <muks@banu.com> | 2009-09-27 08:09:22 +0530 |
commit | 1586b39138a56717a92d9ef7af3f521d54f8accc (patch) | |
tree | 4df7c49afd3de5ac0afaf4ccf2ab3071711fd758 | |
parent | 003df7454a5f8bc357127ae48d0022cb8d7274ba (diff) | |
download | tinyproxy-1586b39138a56717a92d9ef7af3f521d54f8accc.tar.gz tinyproxy-1586b39138a56717a92d9ef7af3f521d54f8accc.zip |
Don't ignore retval of read() in reqs.c
Diffstat (limited to '')
-rw-r--r-- | src/reqs.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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; |