unit-file: do not allow bogus IOSchedulingClass values
We have only three bits of space, i.e. 8 possible classes. Immediately reject anything outside of that range. Add the fuzzer test case and an additional unit test. oss-fuzz #6908.
This commit is contained in:
@@ -1466,7 +1466,7 @@ static const char *const ioprio_class_table[] = {
|
||||
[IOPRIO_CLASS_IDLE] = "idle"
|
||||
};
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(ioprio_class, int, INT_MAX);
|
||||
DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(ioprio_class, int, IOPRIO_N_CLASSES);
|
||||
|
||||
static const char *const sigchld_code_table[] = {
|
||||
[CLD_EXITED] = "exited",
|
||||
|
||||
Reference in New Issue
Block a user