diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-05-30 15:30:07 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-05-30 15:30:07 +0000 |
commit | 5aefe3b277662416ea1a6e97292d4b360ef74c41 (patch) | |
tree | ba2a1fbb6084c1f7c69bfe9feef66370baf5ac59 /package/uhttpd/src | |
parent | 3fc76fb7814dded3730571768f1b6d75fb981f0d (diff) | |
download | mtk-20170518-5aefe3b277662416ea1a6e97292d4b360ef74c41.zip mtk-20170518-5aefe3b277662416ea1a6e97292d4b360ef74c41.tar.gz mtk-20170518-5aefe3b277662416ea1a6e97292d4b360ef74c41.tar.bz2 |
uhttpd: fix wrongly applied sizeof() leading to writing beyound end of buffer and subsequent data corruption (#11557)
SVN-Revision: 32005
Diffstat (limited to 'package/uhttpd/src')
-rw-r--r-- | package/uhttpd/src/uhttpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c index e10f5dc..d5d5dfb 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) { |