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.old;a=commitdiff_plain;h=f5333321e880f4e708816d0635b1e338e05b405b;hp=32967d59c57ca69410f1f69c298d79af53f9ae97 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;