`win-versioninfo': all builds of all Windows binaries now contain
[u/mdw/putty] / misc.c
diff --git a/misc.c b/misc.c
index 9d71a8d..9c8d203 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -441,6 +441,7 @@ void *safemalloc(size_t n, size_t size)
        p = NULL;
     } else {
        size *= n;
+       if (size == 0) size = 1;
 #ifdef MINEFIELD
        p = minefield_c_malloc(size);
 #else