]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix nbd partition id test
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 26 Nov 2014 21:40:04 +0000 (16:40 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 26 Nov 2014 21:40:04 +0000 (16:40 -0500)
Reported-by: David Binderman
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/bdev.c

index c95f3f06dbeaee041e29edf0c073928074d88aa6..75e68968182b601df11a647d00559fe309cdd570 100644 (file)
@@ -3018,7 +3018,7 @@ static int nbd_get_partition(const char *src)
        if (!p)
                return 0;
        p++;
-       if (*p < '1' && *p > '9')
+       if (*p < '1' || *p > '9')
                return 0;
        return *p - '0';
 }