diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-09-09 20:15:02 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-09-09 20:15:02 +0000 |
commit | 045820e3b9f93de607546a8693e7fdb493029fd5 (patch) | |
tree | 0c861c7005e644d195b16960684d544c19c6b0dc /uhttpd.c | |
parent | ec8b567194405c4a6666f00cf088e42c8d59e368 (diff) | |
download | uhttpd-045820e3b9f93de607546a8693e7fdb493029fd5.tar.gz |
[package] uhttpd: break tight loop when receiving eof during header reading (#7904)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@22988 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'uhttpd.c')
-rw-r--r-- | uhttpd.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -401,6 +401,10 @@ static struct http_request * uh_http_header_recv(struct client *cl) { ensure_out(rlen = uh_tcp_recv(cl, bufptr, rlen)); + /* unexpected eof - #7904 */ + if( rlen == 0 ) + return NULL; + blen -= rlen; bufptr += rlen; } |