--- ./c14n.c.orig 2026-04-16 17:17:51.049302691 -0500 +++ ./c14n.c 2026-04-16 17:23:08.324022645 -0500 @@ -1047,16 +1047,13 @@ to ensure that we are forced to go "up" all the time */ tmp_str_len = xmlStrlen(tmp_str); if(tmp_str_len > 1 && tmp_str[tmp_str_len - 2] == '.') { - tmp_str2 = xmlStrcat(tmp_str, BAD_CAST "/"); - if(tmp_str2 == NULL) { - xmlFree(tmp_str); + tmp_str = xmlStrcat(tmp_str, BAD_CAST "/"); + if(tmp_str == NULL) { xmlFree(res); xmlC14NErrInternal("processing xml:base attribute - can't modify uri"); return (NULL); } - - tmp_str = tmp_str2; } /* build uri */