]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshrand.c
Introduced wrapper macros snew(), snewn() and sresize() for the
[PuTTY.git] / sshrand.c
index e2386669dac19f4cd2cc1095142f29c3c8512f58..524bbd43e57072584f9f9c2b7466a7cb2e474100 100644 (file)
--- a/sshrand.c
+++ b/sshrand.c
@@ -202,7 +202,7 @@ int random_byte(void)
 
 void random_get_savedata(void **data, int *len)
 {
-    void *buf = smalloc(POOLSIZE / 2);
+    void *buf = snewn(POOLSIZE / 2, char);
     random_stir();
     memcpy(buf, pool.pool + pool.poolpos, POOLSIZE / 2);
     *len = POOLSIZE / 2;