summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderaadt <deraadt>2017-03-26 15:28:12 +0000
committerderaadt <deraadt>2017-03-26 15:28:12 +0000
commit8136c931d5322d33d25b8bd7de5514b8b1c0d6b6 (patch)
treee9197e8c4535f6fda4a8ade83a6b3aaf2c75c6d4
parentad6f0861298080893afd9dde143516c61d38b572 (diff)
downloadpatch-8136c931d5322d33d25b8bd7de5514b8b1c0d6b6.tar
patch-8136c931d5322d33d25b8bd7de5514b8b1c0d6b6.tar.gz
One string buffer can use recallocarray() to ensure that the address spaceOPENBSD_6_1_BASE
doesn't get dribbled with known contents. ok otto millert tobias
-rw-r--r--pch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pch.c b/pch.c
index 985c10d..d443f42 100644
--- a/pch.c
+++ b/pch.c
@@ -157,7 +157,7 @@ grow_hunkmax(void)
if (new_p_len == NULL)
free(p_len);
- new_p_char = reallocarray(p_char, new_hunkmax, sizeof(char));
+ new_p_char = recallocarray(p_char, hunkmax, new_hunkmax, sizeof(char));
if (new_p_char == NULL)
free(p_char);