projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f38ad33
)
header fragment reject empty early
author
Andy Green
<andy.green@linaro.org>
Wed, 20 Jan 2016 01:44:04 +0000
(09:44 +0800)
committer
Andy Green
<andy.green@linaro.org>
Wed, 20 Jan 2016 01:44:04 +0000
(09:44 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/parsers.c
patch
|
blob
|
history
diff --git
a/lib/parsers.c
b/lib/parsers.c
index
d1e84ac
..
e1fdd24
100644
(file)
--- a/
lib/parsers.c
+++ b/
lib/parsers.c
@@
-209,6
+209,9
@@
LWS_VISIBLE int lws_hdr_copy_fragment(struct lws *wsi, char *dst, int len,
int n = 0;
int f = wsi->u.hdr.ah->frag_index[h];
+ if (!f)
+ return -1;
+
while (n < frag_idx) {
f = wsi->u.hdr.ah->frags[f].nfrag;
if (!f)