summaryrefslogtreecommitdiff
path: root/pkg/openbsd/patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-05-02 22:47:12 -0700
committerMichael Forney <mforney@mforney.org>2017-05-02 23:22:02 -0700
commit73c0a90073109b3616bdbfbe6386c7b2d1df469b (patch)
treeba4c3cdf98abb37fd31fd6000a1ee024e5e24fba /pkg/openbsd/patch
parentfbf3b365dbbabbc26d9c89e71d1a47d6b7d34f4d (diff)
openbsd: Use provided recallocarray instead of patching with explicit_bzero
When I originally looked at this, I only saw the malloc-internal implementation, but it looks like they have left the original standalone recallocarray.c implementation.
Diffstat (limited to 'pkg/openbsd/patch')
-rw-r--r--pkg/openbsd/patch/0018-Use-explicit_bzero-reallocarray-instead-of-recalloca.patch42
1 files changed, 0 insertions, 42 deletions
diff --git a/pkg/openbsd/patch/0018-Use-explicit_bzero-reallocarray-instead-of-recalloca.patch b/pkg/openbsd/patch/0018-Use-explicit_bzero-reallocarray-instead-of-recalloca.patch
deleted file mode 100644
index 9c8b684a..00000000
--- a/pkg/openbsd/patch/0018-Use-explicit_bzero-reallocarray-instead-of-recalloca.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From fcc6087729cc9b0514008876780782e2d1e5afbd Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Fri, 14 Apr 2017 11:56:51 -0700
-Subject: [PATCH] Use explicit_bzero + reallocarray instead of recallocarray
-
----
- lib/libc/gen/fts.c | 4 ++--
- usr.bin/patch/pch.c | 3 ++-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
-index f41254c71..6f10c534f 100644
---- a/lib/libc/gen/fts.c
-+++ b/lib/libc/gen/fts.c
-@@ -967,8 +967,8 @@ fts_palloc(FTS *sp, size_t more)
- errno = ENAMETOOLONG;
- return (1);
- }
-- p = recallocarray(sp->fts_path, sp->fts_pathlen,
-- sp->fts_pathlen + more, 1);
-+ explicit_bzero(sp->fts_path, sp->fts_pathlen);
-+ p = realloc(sp->fts_path, sp->fts_pathlen + more);
- if (p == NULL) {
- free(sp->fts_path);
- sp->fts_path = NULL;
-diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c
-index 251dd7c58..5c69ba281 100644
---- a/usr.bin/patch/pch.c
-+++ b/usr.bin/patch/pch.c
-@@ -157,7 +157,8 @@ grow_hunkmax(void)
- if (new_p_len == NULL)
- free(p_len);
-
-- new_p_char = recallocarray(p_char, hunkmax, new_hunkmax, sizeof(char));
-+ explicit_bzero(p_char, hunkmax);
-+ new_p_char = reallocarray(p_char, new_hunkmax, sizeof(char));
- if (new_p_char == NULL)
- free(p_char);
-
---
-2.12.2
-