mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-03 15:06:34 +00:00
gst/matroska/ebml-read.c: Don't try to modify read-only data.
Original commit message from CVS: * gst/matroska/ebml-read.c: (gst_ebml_read_sint): Don't try to modify read-only data. * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup_or_simpleblock): Fix comment (won't crash any longer now).
This commit is contained in:
parent
683ed4dc0c
commit
f0b8ef9f38
3 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
|||
2006-04-10 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/matroska/ebml-read.c: (gst_ebml_read_sint):
|
||||
Don't try to modify read-only data.
|
||||
|
||||
* gst/matroska/matroska-demux.c:
|
||||
(gst_matroska_demux_parse_blockgroup_or_simpleblock):
|
||||
Fix comment (won't crash any longer now).
|
||||
|
||||
2006-04-10 Michael Smith <msmith@fluendo.com>
|
||||
|
||||
* ext/annodex/gstcmmlenc.c: (gst_cmml_enc_set_header_on_caps):
|
||||
|
|
|
@ -487,7 +487,6 @@ gst_ebml_read_sint (GstEbmlRead * ebml, guint32 * id, gint64 * num)
|
|||
if (!gst_ebml_read_buffer (ebml, id, &buf))
|
||||
return FALSE;
|
||||
|
||||
data = GST_BUFFER_DATA (buf);
|
||||
size = GST_BUFFER_SIZE (buf);
|
||||
if (size < 1 || size > 8) {
|
||||
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
|
||||
|
@ -496,10 +495,16 @@ gst_ebml_read_sint (GstEbmlRead * ebml, guint32 * id, gint64 * num)
|
|||
gst_buffer_unref (buf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
buf = gst_buffer_make_writable (buf);
|
||||
|
||||
data = GST_BUFFER_DATA (buf);
|
||||
|
||||
if (data[0] & 0x80) {
|
||||
negative = 1;
|
||||
data[0] &= ~0x80;
|
||||
}
|
||||
|
||||
*num = 0;
|
||||
while (n < size) {
|
||||
*num = (*num << 8) | data[n++];
|
||||
|
|
|
@ -2274,7 +2274,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
|
|||
}
|
||||
|
||||
case GST_MATROSKA_ID_REFERENCEBLOCK:{
|
||||
/* FIXME: this segfaults
|
||||
/* FIXME: implement support for ReferenceBlock
|
||||
gint64 num;
|
||||
if (!gst_ebml_read_sint (ebml, &id, &num)) {
|
||||
res = FALSE;
|
||||
|
|
Loading…
Reference in a new issue