summaryrefslogtreecommitdiffstats
path: root/mandoc_aux.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-23 21:06:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-23 21:06:41 +0000
commitd14278c71c190ee93f3a8fbe0db5fe9f64fcee24 (patch)
treeb979660d5a5719053862183ee172a781e317d0ba /mandoc_aux.h
parentbd8fc166fb7a4aad04578dee7fe7fc209d5e1488 (diff)
downloadmandoc-d14278c71c190ee93f3a8fbe0db5fe9f64fcee24.tar.gz
Audit malloc(3)/calloc(3)/realloc(3) usage.
* Change eight reallocs to reallocarray to be safe from overflows. * Change one malloc to reallocarray to be safe from overflows. * Change one calloc to reallocarray, no zeroing needed. * Change the order of arguments of three callocs (aesthetical).
Diffstat (limited to 'mandoc_aux.h')
-rw-r--r--mandoc_aux.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mandoc_aux.h b/mandoc_aux.h
index c146e6da..8dc43df6 100644
--- a/mandoc_aux.h
+++ b/mandoc_aux.h
@@ -24,6 +24,7 @@ int mandoc_asprintf(char **, const char *, ...);
void *mandoc_calloc(size_t, size_t);
void *mandoc_malloc(size_t);
void *mandoc_realloc(void *, size_t);
+void *mandoc_reallocarray(void *, size_t, size_t);
char *mandoc_strdup(const char *);
char *mandoc_strndup(const char *, size_t);