mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
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:
parent
cc2d216e88
commit
09ab1d8fb2
3 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue