]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
do not crash on null message.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 22 May 2011 18:08:45 +0000 (20:08 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 22 May 2011 18:08:45 +0000 (20:08 +0200)
lib/x509_b64.c

index 8f9dc4a972b07159227ca5beb363ed170ac30427..f521dc9ebadbf340452cbe12739f0c9385186540 100644 (file)
@@ -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;