Fix nbd partition id test

Reported-by: David Binderman
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber 2014-11-26 16:40:04 -05:00
parent 7c5b6e7c35
commit a6ee12772a
No known key found for this signature in database
GPG Key ID: C638974D64792D67

View 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';
}