mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
Allocate a few more bytes as gmarkup reads past the end of the allocated buffer
Original commit message from CVS: Allocate a few more bytes as gmarkup reads past the end of the allocated buffer
This commit is contained in:
parent
f8ca62be6e
commit
29cafb7481
1 changed files with 3 additions and 2 deletions
|
@ -373,7 +373,8 @@ gst_xml_registry_add_path_list_func (GstXMLRegistry *registry)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
text = g_malloc (BLOCK_SIZE);
|
/* slightly allocate more as gmarkup reads too much */
|
||||||
|
text = g_malloc0 (BLOCK_SIZE + 32);
|
||||||
|
|
||||||
size = fread (text, 1, BLOCK_SIZE, reg);
|
size = fread (text, 1, BLOCK_SIZE, reg);
|
||||||
|
|
||||||
|
@ -548,7 +549,7 @@ gst_xml_registry_load (GstRegistry *registry)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
text = g_malloc (BLOCK_SIZE);
|
text = g_malloc0 (BLOCK_SIZE + 32);
|
||||||
|
|
||||||
size = BLOCK_SIZE;
|
size = BLOCK_SIZE;
|
||||||
CLASS (xmlregistry)->load_func (xmlregistry, text, &size);
|
CLASS (xmlregistry)->load_func (xmlregistry, text, &size);
|
||||||
|
|
Loading…
Reference in a new issue