vj_uncompress_uncomp: copy from/to bigger buffers (used for checks before) instead of cs->cs_ip and ip; just to help static code analysis to see this is correct ;-)

This commit is contained in:
goldsimon 2017-03-30 21:54:42 +02:00
parent aa0601a66d
commit 1c57c84200

View File

@ -483,7 +483,9 @@ vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp)
cs = &comp->rstate[comp->last_recv = IPH_PROTO(ip)];
comp->flags &=~ VJF_TOSS;
IPH_PROTO_SET(ip, IP_PROTO_TCP);
MEMCPY(&cs->cs_ip, ip, hlen);
/* copy from/to bigger buffers checked above instead of cs->cs_ip and ip
just to help static code analysis to see this is correct ;-) */
MEMCPY(&cs->cs_hdr, nb->payload, hlen);
cs->cs_hlen = (u16_t)hlen;
INCR(vjs_uncompressedin);
return 0;