diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:29:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:29:21 +0000 |
commit | f34df9db04b7adaff418b61c35fb1346c1c2fccd (patch) | |
tree | ca9b0e61a1c03f0246b0371423bbbe570193e2f1 /security/nss/lib/ssl | |
parent | Adding upstream version 115.8.0esr. (diff) | |
download | firefox-esr-f34df9db04b7adaff418b61c35fb1346c1c2fccd.tar.xz firefox-esr-f34df9db04b7adaff418b61c35fb1346c1c2fccd.zip |
Adding upstream version 115.9.0esr.upstream/115.9.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'security/nss/lib/ssl')
-rw-r--r-- | security/nss/lib/ssl/sslsecur.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/security/nss/lib/ssl/sslsecur.c b/security/nss/lib/ssl/sslsecur.c index 4a05637039..522e4f4114 100644 --- a/security/nss/lib/ssl/sslsecur.c +++ b/security/nss/lib/ssl/sslsecur.c @@ -488,7 +488,12 @@ ssl_SendSavedWriteData(sslSocket *ss) if (rv < 0) { return rv; } - ss->pendingBuf.len -= rv; + if (rv > ss->pendingBuf.len) { + PORT_Assert(0); /* This shouldn't happen */ + ss->pendingBuf.len = 0; + } else { + ss->pendingBuf.len -= rv; + } if (ss->pendingBuf.len > 0 && rv > 0) { /* UGH !! This shifts the whole buffer down by copying it */ PORT_Memmove(ss->pendingBuf.buf, ss->pendingBuf.buf + rv, |