diff common/listutil.c @ 93:0798b9e35725

Check parameters in verify list
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 21 Mar 2014 09:48:46 +0000
parents 4980b0deb773
children b0579d4fa186
line wrap: on
line diff
--- a/common/listutil.c	Fri Mar 21 09:47:54 2014 +0000
+++ b/common/listutil.c	Fri Mar 21 09:48:46 2014 +0000
@@ -108,6 +108,10 @@
     /* Hash algroithm is sha256 */
     unsigned char hash[32];
 
+    if (!data || !size) {
+        return -1;
+    }
+
     /* Fetch the signature from the first line od data */
     p = strchr(data, '\r');
     if (p == 0 || (unsigned int)(p - (data + 2)) != sig_b64_size) {

http://wald.intevation.org/projects/trustbridge/