ma1 pushed to branch mullvad-browser-115.7.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser
Commits:
-
00f5c6d8
by hackademix at 2024-01-22T17:00:26+01:00
1 changed file:
Changes:
... | ... | @@ -488,7 +488,12 @@ ssl_SendSavedWriteData(sslSocket *ss) |
488 | 488 | if (rv < 0) {
|
489 | 489 | return rv;
|
490 | 490 | }
|
491 | - ss->pendingBuf.len -= rv;
|
|
491 | + if (rv > ss->pendingBuf.len) {
|
|
492 | + PORT_Assert(0); /* This shouldn't happen */
|
|
493 | + ss->pendingBuf.len = 0;
|
|
494 | + } else {
|
|
495 | + ss->pendingBuf.len -= rv;
|
|
496 | + }
|
|
492 | 497 | if (ss->pendingBuf.len > 0 && rv > 0) {
|
493 | 498 | /* UGH !! This shifts the whole buffer down by copying it */
|
494 | 499 | PORT_Memmove(ss->pendingBuf.buf, ss->pendingBuf.buf + rv,
|