From: Owen Shepherd Date: Tue, 23 Apr 2013 17:59:56 +0000 (+0100) Subject: PDCLIB-2 c32rtomb: likewise missing NULL destination check X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=9b12e5ec35375341e306bf96b6a693f84dc084eb PDCLIB-2 c32rtomb: likewise missing NULL destination check --- 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;