1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-27 18:50:07 +03:00

html: Fix check for partial named character references

Digits are allowed after the first character.
This commit is contained in:
Nick Wellnhofer 2025-02-19 12:53:32 +01:00
parent f68c70d298
commit b8234e8c73

View File

@ -3229,7 +3229,9 @@ htmlParseCharData(htmlParserCtxtPtr ctxt, int partial) {
* &CounterClockwiseContourIntegral; has 33 bytes.
*/
for (i = 1; i < avail; i++) {
if ((i >= 32) || !IS_ASCII_LETTER(in[i])) {
if ((i >= 32) ||
(!IS_ASCII_LETTER(in[i]) &&
((i < 2) || !IS_ASCII_DIGIT(in[i])))) {
terminated = 1;
break;
}