reds: Abort on BN-new failures

BN_new returns NULL on allocation failures. Given that we abort
on malloc allocation failures, we should also abort here. The
current code will segfault when BN_new fails as it immediatly tries
to use the NULL pointer.
This commit is contained in:
Christophe Fergeau 2012-09-11 18:03:24 +02:00
parent dc3cd205dd
commit eb19ac081f

View File

@ -1859,7 +1859,7 @@ static void openssl_init(RedLinkInfo *link)
link->tiTicketing.bn = BN_new();
if (!link->tiTicketing.bn) {
spice_warning("OpenSSL BIGNUMS alloc failed");
spice_error("OpenSSL BIGNUMS alloc failed");
}
BN_set_word(link->tiTicketing.bn, f4);