From: Rhodri James Date: Fri, 4 Aug 2017 16:50:50 +0000 (+0100) Subject: Fix wide character issues in param_entity_match_handler() X-Git-Tag: R_2_2_5~24^2~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c64f7a6a65715dcbcebbc5d73468f5af347f3fff;p=libexpat Fix wide character issues in param_entity_match_handler() --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index b724db17..18d42406 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -436,13 +436,13 @@ param_entity_match_handler(void *UNUSED_P(userData), entity_value_to_match == NULL) { return; } - if (!strcmp(entityName, entity_name_to_match)) { + if (!xcstrcmp(entityName, entity_name_to_match)) { /* The cast here is safe because we control the horizontal and * the vertical, and we therefore know our strings are never * going to overflow an int. */ - if (value_length != (int)strlen(entity_value_to_match) || - strncmp(value, entity_value_to_match, value_length)) { + if (value_length != (int)xcstrlen(entity_value_to_match) || + xcstrncmp(value, entity_value_to_match, value_length)) { entity_match_flag = ENTITY_MATCH_FAIL; } else { entity_match_flag = ENTITY_MATCH_SUCCESS;