projects
/
openwrt
/
staging
/
zorun.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28a93ee
)
uhttpd: fix segmentation fault triggered by invalid header line
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 12 Aug 2010 10:56:41 +0000
(10:56 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 12 Aug 2010 10:56:41 +0000
(10:56 +0000)
SVN-Revision: 22607
package/uhttpd/src/uhttpd.c
patch
|
blob
|
history
diff --git
a/package/uhttpd/src/uhttpd.c
b/package/uhttpd/src/uhttpd.c
index 247eb79752fb252c5fe8aa440e92c9122b776941..764ff7d5703b332ddfdbc4bd2e9f5eb63265dcc7 100644
(file)
--- 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");