]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - misc.c
Add ability for ssh2_userkey_loadpub() to return the key comment.
[PuTTY.git] / misc.c
diff --git a/misc.c b/misc.c
index 9d71a8d4b1617c3b36162f3a7c81c2ba81876118..9c8d203935a862f7e02c5b91f82d37f9e2a9edd4 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