gst/base/gstbasesrc.c (gst_basesrc_get_range): Check if the offset is greater than the file's size.

Original commit message from CVS:
2005-06-23  Andy Wingo  <wingo@pobox.com>

* gst/base/gstbasesrc.c (gst_basesrc_get_range): Check if the
offset is greater than the file's size.
This commit is contained in:
Andy Wingo 2005-06-23 15:26:09 +00:00
parent cc2d216e88
commit 09ab1d8fb2
3 changed files with 9 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2005-06-23 Andy Wingo <wingo@pobox.com>
* gst/base/gstbasesrc.c (gst_basesrc_get_range): Check if the
offset is greater than the file's size.
* gst/gstobject.h (GST_CLASS_LOCK, GST_CLASS_TRYLOCK)
(GST_CLASS_UNLOCK, GST_CLASS_GET_LOCK, GstObjectClass)
* gst/gstobject.c (gst_object_class_init): Make the class lock

View file

@ -502,6 +502,9 @@ gst_basesrc_get_range (GstPad * pad, guint64 offset, guint length,
/* check size */
if (src->size != -1) {
if (offset > src->size)
goto unexpected_length;
if (offset + length > src->size) {
if (bclass->get_size)
bclass->get_size (src, &src->size);

View file

@ -502,6 +502,9 @@ gst_basesrc_get_range (GstPad * pad, guint64 offset, guint length,
/* check size */
if (src->size != -1) {
if (offset > src->size)
goto unexpected_length;
if (offset + length > src->size) {
if (bclass->get_size)
bclass->get_size (src, &src->size);