mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-31 06:50:06 +03:00
malloc-fail: Fix null deref in xmlParserInputShrink
Found by OSS-Fuzz.
This commit is contained in:
parent
5f4ec41bae
commit
457fc622d5
@ -424,6 +424,13 @@ xmlParserInputShrink(xmlParserInputPtr in) {
|
||||
}
|
||||
|
||||
in->base = xmlBufContent(in->buf->buffer);
|
||||
if (in->base == NULL) {
|
||||
/* TODO: raise error */
|
||||
in->base = BAD_CAST "";
|
||||
in->cur = in->base;
|
||||
in->end = in->base;
|
||||
return;
|
||||
}
|
||||
in->cur = in->base + used;
|
||||
in->end = xmlBufEnd(in->buf->buffer);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user