# HG changeset patch # User Andre Heinecke # Date 1395395326 0 # Node ID 0798b9e357251b19558a548f2b95b5ff7f3d11a1 # Parent 4980b0deb773d1034a7b8deaea0b50b737a0515b Check parameters in verify list diff -r 4980b0deb773 -r 0798b9e35725 common/listutil.c --- 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) {