summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2011-04-04 10:07:42 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-04-04 10:07:42 +0200
commitfb1217281093b73b7ab3d85f5cda494db5729f06 (patch)
tree1d233eb2da143705207ac8b97b322ac5ccf9683b
parent17d9447ea59094a8bc11661173cd9fa486c2411a (diff)
qtdemux: Check for invalid (empty) classification info entity strings
Otherwise the classification string can be empty and gst_tag_list_add() will complain or have a \0 in the first four bytes, which is wrong too.
-rw-r--r--gst/qtdemux/qtdemux.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 63871a5a8..64a9d4456 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -7584,6 +7584,12 @@ qtdemux_tag_add_classification (GstQTDemux * qtdemux, const char *tag,
offset = 12;
entity = (guint8 *) node->data + offset;
+ if (entity[0] == 0 || entity[1] == 0 || entity[2] == 0 || entity[3] == 0) {
+ GST_DEBUG_OBJECT (qtdemux,
+ "classification info: %c%c%c%c invalid classification entity",
+ entity[0], entity[1], entity[2], entity[3]);
+ return;
+ }
offset += 4;
table = QT_UINT16 ((guint8 *) node->data + offset);