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:
parent
266fd0eabc
commit
c5e04d5127
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue