diff options
Diffstat (limited to 'lib/libiconv_modules/ISO2022/citrus_iso2022.c')
-rw-r--r-- | lib/libiconv_modules/ISO2022/citrus_iso2022.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libiconv_modules/ISO2022/citrus_iso2022.c b/lib/libiconv_modules/ISO2022/citrus_iso2022.c index f3613d62444c..c88a23ee1abf 100644 --- a/lib/libiconv_modules/ISO2022/citrus_iso2022.c +++ b/lib/libiconv_modules/ISO2022/citrus_iso2022.c @@ -259,8 +259,8 @@ get_recommend(_ISO2022EncodingInfo * __restrict ei, if (!ei->recommend[i]) ei->recommend[i] = malloc(sizeof(_ISO2022Charset)); else { - p = realloc(ei->recommend[i], - sizeof(_ISO2022Charset) * (ei->recommendsize[i] + 1)); + p = reallocarray(ei->recommend[i], ei->recommendsize[i] + 1, + sizeof(_ISO2022Charset)); if (!p) return (_PARSEFAIL); ei->recommend[i] = p; |