summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index da5778138..bc131385f 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: utf8.c,v 1.6 2017/04/17 14:31:23 schwarze Exp $ */ 1/* $OpenBSD: utf8.c,v 1.7 2017/05/31 09:15:42 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> 3 * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4 * 4 *
@@ -76,7 +76,7 @@ grow_dst(char **dst, size_t *sz, size_t maxsz, char **dp, size_t need)
76 tsz = *sz + 128; 76 tsz = *sz + 128;
77 if (tsz > maxsz) 77 if (tsz > maxsz)
78 tsz = maxsz; 78 tsz = maxsz;
79 if ((tp = realloc(*dst, tsz)) == NULL) 79 if ((tp = recallocarray(*dst, *sz, tsz, 1)) == NULL)
80 return -1; 80 return -1;
81 *dp = tp + (*dp - *dst); 81 *dp = tp + (*dp - *dst);
82 *dst = tp; 82 *dst = tp;