From e12c0ef4cc7fdbc7dcee4bd5a62b76529406bb19 Mon Sep 17 00:00:00 2001 From: Ervin Hegedus Date: Wed, 2 Jul 2025 21:37:21 +0200 Subject: [PATCH] Remove unvanted '\0' string terminator from arg value --- apache2/msc_xml.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apache2/msc_xml.c b/apache2/msc_xml.c index 1deac6fc4..4f0e07ca0 100644 --- a/apache2/msc_xml.c +++ b/apache2/msc_xml.c @@ -76,8 +76,8 @@ static void msc_xml_on_end_elementns( msr_log(msr, 4, "Skipping request argument, over limit (XML): name \"%s\", value \"%s\"", log_escape_ex(msr->mp, xml_parser_state->currpath, xml_parser_state->currpathbufflen), log_escape_ex(msr->mp, - (xml_parser_state->currval == NULL ? apr_pstrndup(msr->mp, "", 1) : xml_parser_state->currval), - (xml_parser_state->currvalbufflen == 0 ? 1 : xml_parser_state->currvalbufflen) + (xml_parser_state->currval == NULL ? apr_pstrndup(msr->mp, "", 0) : xml_parser_state->currval), + xml_parser_state->currvalbufflen ) ); } @@ -91,8 +91,8 @@ static void msc_xml_on_end_elementns( arg->name = xml_parser_state->currpath; arg->name_len = xml_parser_state->currpathbufflen; - arg->value = (xml_parser_state->currval == NULL) ? apr_pstrndup(msr->mp, "", 1) : xml_parser_state->currval; - arg->value_len = (xml_parser_state->currvalbufflen == 0) ? 1 : xml_parser_state->currvalbufflen; + arg->value = (xml_parser_state->currval == NULL) ? apr_pstrndup(msr->mp, "", 0) : xml_parser_state->currval; + arg->value_len = xml_parser_state->currvalbufflen; arg->value_origin_len = arg->value_len; arg->origin = "XML";