diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-09-02 15:19:41 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-09-02 15:19:41 +0000 |
commit | 6ebd04219f0d749c87a763e8afb578dfcd5223cc (patch) | |
tree | bb0f29e0a3791fff88551c93f5d4ba7113bdba43 /sbin/mount_vnd | |
parent | be524287dc216d876f995eddcaf32762c702c6e9 (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.c | 2 |
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; |