diff --git a/bignum.c b/bignum.c
index a8b2164b7af36f8443e07055e5448a9ef8cbf527..c9f5a460c28f58fda2a3d406ae474022f41c383f 100644
--- a/bignum.c
+++ b/bignum.c
@@ -65,7 +65,7 @@ nettle_mpz_get_str_256(unsigned length, uint8_t *s, mpz_t x)
     }
   
   if (length)
-    memset(dst, 0, length);
+    memset(s, 0, length);
 }
 
 void