Browse code

bb11444 - zeroing out buffer at allocation to avoid writing uninitialized bytes to a file

Mickey Sola authored on 2016/01/28 04:17:47
Showing 1 changed files
... ...
@@ -789,7 +789,7 @@ char *decrypt_any(struct pdf_struct *pdf, uint32_t id, const char *in, off_t *le
789 789
     if (n > 16)
790 790
         n = 16;
791 791
 
792
-    q = cli_malloc(*length);
792
+    q = cli_calloc(*length, sizeof(char));
793 793
     if (!q) {
794 794
         noisy_warnmsg("decrypt_any: malloc failed\n");
795 795
         return NULL;