mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
uridecode no need to require length plus 2
length + 1 (for the '\0' is enough) Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
3ba035dc2c
commit
9f54c1ff73
1 changed files with 1 additions and 1 deletions
|
@ -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],
|
||||
|
|
Loading…
Add table
Reference in a new issue