mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity 472861: http2: deal with zero length data without overflow
This commit is contained in:
parent
ff0e0f3c35
commit
7333fcc9cd
1 changed files with 7 additions and 5 deletions
|
@ -2322,12 +2322,14 @@ lws_h2_parser(struct lws *wsi, unsigned char *in, lws_filepos_t _inlen,
|
|||
(unsigned int)h2n->count,
|
||||
(unsigned int)h2n->length);
|
||||
|
||||
in += (unsigned int)n - 1;
|
||||
h2n->inside += (unsigned int)n;
|
||||
h2n->count += (unsigned int)n - 1;
|
||||
if (n) {
|
||||
in += (unsigned int)n - 1;
|
||||
h2n->inside += (unsigned int)n;
|
||||
h2n->count += (unsigned int)n - 1;
|
||||
|
||||
h2n->swsi->txc.peer_tx_cr_est -= n;
|
||||
wsi->txc.peer_tx_cr_est -= n;
|
||||
h2n->swsi->txc.peer_tx_cr_est -= n;
|
||||
wsi->txc.peer_tx_cr_est -= n;
|
||||
}
|
||||
|
||||
do_windows:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue