summaryrefslogtreecommitdiff
path: root/package/uhttpd/src
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-05-30 15:30:07 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-05-30 15:30:07 +0000
commit28e515440f6e62733a59e2f64bed8f1a456b1818 (patch)
tree123578d2ca73699d886ffb7b4379099f2c951f67 /package/uhttpd/src
parentf91824b22d53ebdd02a6d271b74d26fd7edd7cfc (diff)
[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
Diffstat (limited to 'package/uhttpd/src')
-rw-r--r--package/uhttpd/src/uhttpd.c4
1 files changed, 2 insertions, 2 deletions
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)
{