Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: net/third_party/nss/ssl/sslsock.c

Issue 22758002: Fix a crash in SSL under memory pressure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/third_party/nss/patches/sslsock_903565.patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * vtables (and methods that call through them) for the 4 types of 2 * vtables (and methods that call through them) for the 4 types of
3 * SSLSockets supported. Only one type is still supported. 3 * SSLSockets supported. Only one type is still supported.
4 * Various other functions. 4 * Various other functions.
5 * 5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public 6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9 #include "seccomon.h" 9 #include "seccomon.h"
10 #include "cert.h" 10 #include "cert.h"
(...skipping 3039 matching lines...) Expand 10 before | Expand all | Expand 10 after
3050 /* This should be of type SSLKEAType, but CC on IRIX 3050 /* This should be of type SSLKEAType, but CC on IRIX
3051 * complains during the for loop. 3051 * complains during the for loop.
3052 */ 3052 */
3053 int i; 3053 int i;
3054 SECStatus status; 3054 SECStatus status;
3055 3055
3056 ss->opt = ssl_defaults; 3056 ss->opt = ssl_defaults;
3057 ss->opt.useSocks = PR_FALSE; 3057 ss->opt.useSocks = PR_FALSE;
3058 ss->opt.noLocks = !makeLocks; 3058 ss->opt.noLocks = !makeLocks;
3059 ss->vrange = *VERSIONS_DEFAULTS(protocolVariant); 3059 ss->vrange = *VERSIONS_DEFAULTS(protocolVariant);
3060 ss->protocolVariant = protocolVariant;
3060 3061
3061 ss->peerID = NULL; 3062 ss->peerID = NULL;
3062 ss->rTimeout = PR_INTERVAL_NO_TIMEOUT; 3063 ss->rTimeout = PR_INTERVAL_NO_TIMEOUT;
3063 ss->wTimeout = PR_INTERVAL_NO_TIMEOUT; 3064 ss->wTimeout = PR_INTERVAL_NO_TIMEOUT;
3064 ss->cTimeout = PR_INTERVAL_NO_TIMEOUT; 3065 ss->cTimeout = PR_INTERVAL_NO_TIMEOUT;
3065 ss->cipherSpecs = NULL; 3066 ss->cipherSpecs = NULL;
3066 ss->sizeCipherSpecs = 0; /* produced lazily */ 3067 ss->sizeCipherSpecs = 0; /* produced lazily */
3067 ss->preferredCipher = NULL; 3068 ss->preferredCipher = NULL;
3068 ss->url = NULL; 3069 ss->url = NULL;
3069 3070
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
3110 if (status != SECSuccess) 3111 if (status != SECSuccess)
3111 goto loser; 3112 goto loser;
3112 status = ssl_InitGather(&ss->gs); 3113 status = ssl_InitGather(&ss->gs);
3113 if (status != SECSuccess) { 3114 if (status != SECSuccess) {
3114 loser: 3115 loser:
3115 ssl_DestroySocketContents(ss); 3116 ssl_DestroySocketContents(ss);
3116 ssl_DestroyLocks(ss); 3117 ssl_DestroyLocks(ss);
3117 PORT_Free(ss); 3118 PORT_Free(ss);
3118 ss = NULL; 3119 ss = NULL;
3119 } 3120 }
3120 ss->protocolVariant = protocolVariant;
3121 } 3121 }
3122 return ss; 3122 return ss;
3123 } 3123 }
3124 3124
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/sslsock_903565.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698