basesrc: mind boggling wrap when comparing offsets
authorMark Nauwelaerts <mnauw@users.sourceforge.net>
Sat, 2 Nov 2013 14:42:07 +0000 (15:42 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 9 Nov 2013 09:29:16 +0000 (10:29 +0100)
libs/gst/base/gstbasesrc.c

index e35824f44b4ace879d79eeaff8eb8313826a455e..dd55e32b382032d8ec4e0dee072f0b75cbedadcc 100644 (file)
@@ -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))