From: Nikos Mavrogiannopoulos Date: Sun, 22 May 2011 18:08:45 +0000 (+0200) Subject: do not crash on null message. X-Git-Tag: gnutls_2_99_2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebb56017fb7592748d7f36dc87c8d5163cb89aad;p=thirdparty%2Fgnutls.git do not crash on null message. --- diff --git a/lib/x509_b64.c b/lib/x509_b64.c index 8f9dc4a972..f521dc9eba 100644 --- a/lib/x509_b64.c +++ b/lib/x509_b64.c @@ -195,7 +195,7 @@ _gnutls_fbase64_encode (const char *msg, const uint8_t * data, uint8_t bottom[80]; int pos, bytes, top_len, bottom_len; - if (strlen(msg) > 50) + if (msg == NULL || strlen(msg) > 50) { gnutls_assert (); return GNUTLS_E_BASE64_ENCODING_ERROR;