ssl_create_cipher_list: check whether push onto cipherstack succeeds

(Imported from upstream's f5905ba341ad0fa3731469f10f7fba6f92ecd787.)

Change-Id: I92f2f53a127a4f59ce71cf00a9a4aedd0560e586
Reviewed-on: https://boringssl-review.googlesource.com/2832
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2015-01-11 19:59:06 -05:00 committed by Adam Langley
parent af19de3101
commit 2adb7ec286

View File

@ -1066,7 +1066,9 @@ ssl_create_cipher_list(const SSL_PROTOCOL_METHOD *ssl_method,
* to the resulting precedence to the STACK_OF(SSL_CIPHER). */
for (curr = head; curr != NULL; curr = curr->next) {
if (curr->active) {
sk_SSL_CIPHER_push(cipherstack, curr->cipher);
if (!sk_SSL_CIPHER_push(cipherstack, curr->cipher)) {
goto err;
}
in_group_flags[num_in_group_flags++] = curr->in_group;
}
}