Oops - puttytel now needs a stub random_destroy_seed() to compile
[u/mdw/putty] / sshbn.c
diff --git a/sshbn.c b/sshbn.c
index adb8824..dbf223d 100644 (file)
--- a/sshbn.c
+++ b/sshbn.c
@@ -324,6 +324,9 @@ int ssh1_read_bignum(unsigned char *data, Bignum *result) {
     b = (w+7)/8;                       /* bits -> bytes */
     w = (w+15)/16;                    /* bits -> words */
 
+    if (!result)                       /* just return length */
+        return b + 2;
+
     bn = newbn(w);
 
     for (i=1; i<=w; i++)