--- httpd-2.4.58/modules/filters/mod_xml2enc.c 2023-12-07 13:34:04.127557827 +0100 +++ httpd-2.4.58/modules/filters/mod_xml2enc.c.orig 2023-12-07 13:33:48.777184873 +0100 @@ -209,7 +209,7 @@ /* to sniff, first we look for BOM */ if (ctx->xml2enc == XML_CHAR_ENCODING_NONE) { - ctx->xml2enc = xmlDetectCharEncoding((const xmlChar*)ctx->buf, + ctx->xml2enc = xmlDetectCharEncoding((const unsigned char*)ctx->buf, ctx->bytes); if (HAVE_ENCODING(ctx->xml2enc)) { ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01432)