fstab-util: detect out-of-range pri= assignments
We would silently ignore them. One would have to be crazy to do assign an out of range value, but simply ignoring it bothers me.
This commit is contained in:
@@ -140,6 +140,9 @@ int fstab_find_pri(const char *options, int *ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if ((int) pri < 0)
|
||||
return -ERANGE;
|
||||
|
||||
*ret = (int) r;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user