[package] uhttpd: break tight loop when receiving eof during header reading (#7904)
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 9 Sep 2010 20:15:02 +0000 (20:15 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 9 Sep 2010 20:15:02 +0000 (20:15 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22988 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/uhttpd/Makefile
package/uhttpd/src/uhttpd.c

index 086c294..e37fa90 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uhttpd
-PKG_RELEASE:=17
+PKG_RELEASE:=18
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 PKG_BUILD_DEPENDS := libcyassl liblua
index 6f5e616..a818e1c 100644 (file)
@@ -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;
                        }
This page took 0.027444 seconds and 4 git commands to generate.