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:
3ba035d
)
uridecode no need to require length plus 2
author
Andy Green
<andy.green@linaro.org>
Fri, 18 Dec 2015 08:40:02 +0000
(16:40 +0800)
committer
Andy Green
<andy.green@linaro.org>
Fri, 18 Dec 2015 08:40:02 +0000
(16:40 +0800)
length + 1 (for the '\0' is enough)
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
2720b15
..
2b63fae
100644
(file)
--- a/
lib/parsers.c
+++ b/
lib/parsers.c
@@
-110,7
+110,7
@@
LWS_VISIBLE int lws_hdr_copy_fragment(struct lws *wsi, char *dst, int len,
n++;
}
- if (wsi->u.hdr.ah->frags[f].len >=
(len - 1)
)
+ if (wsi->u.hdr.ah->frags[f].len >=
len
)
return -1;
memcpy(dst, &wsi->u.hdr.ah->data[wsi->u.hdr.ah->frags[f].offset],