1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

buflist: linear copy must account for LWS_PRE

This commit is contained in:
Andy Green 2020-01-04 10:13:29 +00:00
parent 2f204d559a
commit fc2e659864

View file

@ -185,7 +185,7 @@ lws_buflist_linear_copy(struct lws_buflist **head, size_t ofs, uint8_t *buf,
s = p->len - ofs;
if (s > len)
s = len;
memcpy(buf, ((uint8_t *)&p[1]) + ofs, s);
memcpy(buf, ((uint8_t *)&p[1]) + LWS_PRE + ofs, s);
len -= s;
buf += s;
ofs = 0;