gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r14172 - libmicrohttpd/src/daemon


From: gnunet
Subject: [GNUnet-SVN] r14172 - libmicrohttpd/src/daemon
Date: Fri, 14 Jan 2011 19:21:17 +0100

Author: grothoff
Date: 2011-01-14 19:21:17 +0100 (Fri, 14 Jan 2011)
New Revision: 14172

Modified:
   libmicrohttpd/src/daemon/base64.c
Log:
nullcheck

Modified: libmicrohttpd/src/daemon/base64.c
===================================================================
--- libmicrohttpd/src/daemon/base64.c   2011-01-14 18:20:19 UTC (rev 14171)
+++ libmicrohttpd/src/daemon/base64.c   2011-01-14 18:21:17 UTC (rev 14172)
@@ -68,8 +68,9 @@
                /* Wrong base64 string length */
                return NULL;
        }
-       result = dest = (char*) malloc(in_len / 4 * 3 + 1);
-
+       result = dest = malloc(in_len / 4 * 3 + 1);
+       if (result == NULL)
+          return NULL; /* out of memory */
        while (*src) {
                char a = base64_digits[(unsigned char)*(src++)];
                char b = base64_digits[(unsigned char)*(src++)];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]