Fix nbd partition id test

Reported-by: David Binderman Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 7c5b6e7c
......@@ -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';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment