mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-10 08:58:16 +03:00
Heap-buffer-overflow read of size 1 in xmlFAParsePosCharGroup
Credit to OSS-Fuzz. Add a check to xmlFAParseCharRange() for the end of the buffer to prevent reading past the end of it. This fixes Bug 784017.
This commit is contained in:
parent
8a0c66986e
commit
fb56f80eef
@ -5053,7 +5053,7 @@ xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
|
||||
return;
|
||||
}
|
||||
len = 1;
|
||||
} else if ((cur != 0x5B) && (cur != 0x5D)) {
|
||||
} else if ((cur != '\0') && (cur != 0x5B) && (cur != 0x5D)) {
|
||||
end = CUR_SCHAR(ctxt->cur, len);
|
||||
} else {
|
||||
ERROR("Expecting the end of a char range");
|
||||
|
Loading…
x
Reference in New Issue
Block a user