ma1 pushed to branch base-browser-115.7.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
6c906dba
by hackademix at 2024-01-22T16:46:05+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,
|