summaryrefslogtreecommitdiff
path: root/sbin/mount_vnd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-09-02 15:19:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-09-02 15:19:41 +0000
commit6ebd04219f0d749c87a763e8afb578dfcd5223cc (patch)
treebb0f29e0a3791fff88551c93f5d4ba7113bdba43 /sbin/mount_vnd
parentbe524287dc216d876f995eddcaf32762c702c6e9 (diff)
use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg
Diffstat (limited to 'sbin/mount_vnd')
-rw-r--r--sbin/mount_vnd/pkcs5_pbkdf2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/mount_vnd/pkcs5_pbkdf2.c b/sbin/mount_vnd/pkcs5_pbkdf2.c
index b88ee815b8e..75e9f7ac705 100644
--- a/sbin/mount_vnd/pkcs5_pbkdf2.c
+++ b/sbin/mount_vnd/pkcs5_pbkdf2.c
@@ -155,7 +155,7 @@ pkcs5_pbkdf2(u_int8_t **r, int dkLen, const u_int8_t *P, int Plen,
l = (dkLen + PRF_BLOCKLEN - 1) / PRF_BLOCKLEN;
/* allocate the output */
- *r = malloc(l * PRF_BLOCKLEN);
+ *r = calloc(l, PRF_BLOCKLEN);
if (!*r)
return -1;