diff --git a/apache2/msc_util.c b/apache2/msc_util.c index 3641b270..23ae0375 100644 --- a/apache2/msc_util.c +++ b/apache2/msc_util.c @@ -120,8 +120,13 @@ char *utf8_unicode_inplace_ex(apr_pool_t *mp, unsigned char *input, long int inp if ((c & 0x80) == 0) { /* single byte unicode (7 bit ASCII equivilent) has no validation */ count++; - if(count <= len) - *data++ = c; + if(count <= len) { + if(c == 0) + *data = x2c(&c); + else + *data++ = c; + } + } /* If first byte begins with binary 110 it is two byte encoding*/ else if ((c & 0xE0) == 0xC0) {