From f5333321e880f4e708816d0635b1e338e05b405b Mon Sep 17 00:00:00 2001 From: Owen Shepherd Date: Tue, 23 Apr 2013 18:59:56 +0100 Subject: [PATCH] PDCLIB-2 c32rtomb: likewise missing NULL destination check --- functions/uchar/c32rtomb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/uchar/c32rtomb.c b/functions/uchar/c32rtomb.c index b72b7e9..d9f016d 100644 --- a/functions/uchar/c32rtomb.c +++ b/functions/uchar/c32rtomb.c @@ -23,6 +23,9 @@ size_t c32rtomb_l( locale_t restrict l ) { + char buf[s ? 0 : MB_CUR_MAX]; + s = s ? s : buf; + const char32_t *restrict psrc = &c32; size_t srcsz = 1; size_t dstsz = MB_CUR_MAX; -- 2.40.0