diff options
author | J.C. Jones <jjones@mozilla.com> | 2018-03-21 15:07:11 -0700 |
---|---|---|
committer | J.C. Jones <jjones@mozilla.com> | 2018-03-21 15:07:11 -0700 |
commit | 04607a28949e0a46b7f387ae7d630a45d2f92088 (patch) | |
tree | 3e6c47b7a5ffe67a34fb8152bc0e2d7214a34a12 /lib/ssl | |
parent | b34ee8106923683ccb5128a5560a3b1dae105687 (diff) | |
download | nss-hg-04607a28949e0a46b7f387ae7d630a45d2f92088.tar.gz |
Bug 1447825 - Check sslBuffer_Append in ssl_CallCustomExtensionSenders r=mt
Coverity caught that one use of sslBuffer_Append doesn't check the return,
which is abnormal. Since cleanup is the same either way, it's a matter for
OOM propagation. This adds the check in a minimal way.
Diffstat (limited to 'lib/ssl')
-rw-r--r-- | lib/ssl/ssl3ext.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c index 5a5077998..28c2611b1 100644 --- a/lib/ssl/ssl3ext.c +++ b/lib/ssl/ssl3ext.c @@ -681,7 +681,11 @@ ssl_CallCustomExtensionSenders(sslSocket *ss, sslBuffer *buf, } } - sslBuffer_Append(buf, tail.buf, tail.len); + rv = sslBuffer_Append(buf, tail.buf, tail.len); + if (rv != SECSuccess) { + goto loser; /* Code already set. */ + } + sslBuffer_Clear(&tail); return SECSuccess; |