aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-05-30 15:30:07 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-05-30 15:30:07 +0000
commite2b17e1784016ad7fe5ee8e45c0742b14a5fe431 (patch)
tree123578d2ca73699d886ffb7b4379099f2c951f67
parentb032357e859d8c52047fe152fcb50c475067d022 (diff)
downloadupstream-e2b17e1784016ad7fe5ee8e45c0742b14a5fe431.tar.gz
upstream-e2b17e1784016ad7fe5ee8e45c0742b14a5fe431.tar.bz2
upstream-e2b17e1784016ad7fe5ee8e45c0742b14a5fe431.zip
[package] uhttpd: fix wrongly applied sizeof() leading to writing beyound end of buffer and subsequent data corruption (#11557)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32005 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/uhttpd/Makefile2
-rw-r--r--package/uhttpd/src/uhttpd.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile
index f30d6cabd1..13da14dfe9 100644
--- a/package/uhttpd/Makefile
+++ b/package/uhttpd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
-PKG_RELEASE:=33
+PKG_RELEASE:=34
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_CONFIG_DEPENDS := \
diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c
index e10f5dc9e1..d5d5dfb982 100644
--- a/package/uhttpd/src/uhttpd.c
+++ b/package/uhttpd/src/uhttpd.c
@@ -385,10 +385,10 @@ static struct http_request * uh_http_header_recv(struct client *cl)
char *bufptr = cl->httpbuf.buf;
char *idxptr = NULL;
- ssize_t blen = sizeof(cl->httpbuf)-1;
+ ssize_t blen = sizeof(cl->httpbuf.buf)-1;
ssize_t rlen = 0;
- memset(bufptr, 0, sizeof(cl->httpbuf));
+ memset(bufptr, 0, sizeof(cl->httpbuf.buf));
while (blen > 0)
{