mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
store_plugin: avoid potential NULL deref in boolean context
Coverity CID 330466
This commit is contained in:
@@ -1094,8 +1094,10 @@ store_plugin(const char *str, struct sudo_defs_types *def, int op)
|
||||
if (op == false || op == true)
|
||||
(void)list_op(NULL, 0, &def->sd_un.list, freeall);
|
||||
|
||||
if (!list_op(str, strlen(str), &def->sd_un.list, lop))
|
||||
debug_return_bool(false);
|
||||
if (str != NULL) {
|
||||
if (!list_op(str, strlen(str), &def->sd_un.list, lop))
|
||||
debug_return_bool(false);
|
||||
}
|
||||
|
||||
debug_return_bool(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user