cap-list: refuse parsing numeric capability 63
We refuse it otherwise currently, simply because we cannot store it in a uint64_t caps mask value anymore while retaining the ability to use UINT64_MAX as "unset" marker. The check actually was in place already, just one off.
This commit is contained in:
@@ -35,10 +35,10 @@ int capability_from_name(const char *name) {
|
||||
/* Try to parse numeric capability */
|
||||
r = safe_atoi(name, &i);
|
||||
if (r >= 0) {
|
||||
if (i >= 0 && i < 64)
|
||||
return i;
|
||||
else
|
||||
if (i < 0 || i >= 63)
|
||||
return -EINVAL;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
/* Try to parse string capability */
|
||||
|
||||
Reference in New Issue
Block a user