[Spice-devel] [PATCH] spice-channel: warn and fail if pubkey is NULL (instead of crashing in next line)

Alon Levy alevy at redhat.com
Thu Mar 17 04:10:30 PDT 2011


---
 gtk/spice-channel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 539bc39..e701f31 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -822,6 +822,7 @@ static void spice_channel_send_spice_ticket(SpiceChannel *channel)
 
     BIO_write(bioKey, c->peer_msg->pub_key, SPICE_TICKET_PUBKEY_BYTES);
     pubkey = d2i_PUBKEY_bio(bioKey, NULL);
+    g_warn_if_fail(pubkey == NULL);
     rsa = pubkey->pkey.rsa;
     nRSASize = RSA_size(rsa);
 
-- 
1.7.4.1



More information about the Spice-devel mailing list