From: Mark Nauwelaerts Date: Sat, 2 Nov 2013 14:42:07 +0000 (+0100) Subject: basesrc: mind boggling wrap when comparing offsets X-Git-Tag: 1.3.1~342 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e10af7c4091ef1efc78443364865311b8b80c434;p=platform%2Fupstream%2Fgstreamer.git basesrc: mind boggling wrap when comparing offsets --- diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 10f4b5b..10b5a35 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -2292,8 +2292,8 @@ gst_base_src_update_length (GstBaseSrc * src, guint64 offset, guint * length, /* check size if we have one */ if (maxsize != -1) { /* if we run past the end, check if the file became bigger and - * retry. */ - if (G_UNLIKELY (offset + *length >= maxsize || force)) { + * retry. Mind wrap when checking. */ + if (G_UNLIKELY (offset >= maxsize || offset + *length >= maxsize || force)) { /* see if length of the file changed */ if (bclass->get_size) if (!bclass->get_size (src, &size))