core: Fix content range check
authorJens Georg <mail@jensge.org>
Mon, 14 May 2012 21:09:35 +0000 (23:09 +0200)
committerJens Georg <mail@jensge.org>
Wed, 13 Jun 2012 20:00:39 +0000 (22:00 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=676037

src/rygel/rygel-http-seek.vala

index 1518e63..a857734 100644 (file)
@@ -47,11 +47,11 @@ internal abstract class Rygel.HTTPSeek : GLib.Object {
         this.length = length;
         this.total_length = total_length;
 
-        if (start < 0 || start > total_length) {
+        if (start < 0 || start >= total_length) {
             throw new HTTPSeekError.OUT_OF_RANGE (_("Out Of Range Start '%ld'"),
                                                   start);
         }
-        if (stop < 0 || stop > total_length) {
+        if (stop < 0 || stop >= total_length) {
             throw new HTTPSeekError.OUT_OF_RANGE (_("Out Of Range Stop '%ld'"),
                                                   stop);
         }