diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-08-12 10:56:41 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-08-12 10:56:41 +0000 |
commit | fcc45163338ba8d373211a6c718bc624ff45cb9e (patch) | |
tree | c109bbd651eb613cb7dd74e33c243f6a78add4fd /package | |
parent | ac8e48f18ddf6488ee5b028cc619dee4a027423b (diff) | |
download | upstream-fcc45163338ba8d373211a6c718bc624ff45cb9e.tar.gz upstream-fcc45163338ba8d373211a6c718bc624ff45cb9e.tar.bz2 upstream-fcc45163338ba8d373211a6c718bc624ff45cb9e.zip |
[package] uhttpd: fix segmentation fault triggered by invalid header line
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22607 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/uhttpd/src/uhttpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c index 247eb79752..764ff7d570 100644 --- a/package/uhttpd/src/uhttpd.c +++ b/package/uhttpd/src/uhttpd.c @@ -266,7 +266,8 @@ static struct http_request * uh_http_header_parse(struct client *cl, char *buffe } /* check version */ - if( strcmp(version, "HTTP/0.9") && strcmp(version, "HTTP/1.0") && strcmp(version, "HTTP/1.1") ) + if( (version == NULL) || (strcmp(version, "HTTP/0.9") && + strcmp(version, "HTTP/1.0") && strcmp(version, "HTTP/1.1")) ) { /* unsupported version */ uh_http_response(cl, 400, "Bad Request"); |