mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
Suppress PVS Studio false positives.
This commit is contained in:
parent
63d043fae2
commit
91351d57f4
@ -117,7 +117,7 @@ json_array_to_strvec(struct json_object *array)
|
|||||||
}
|
}
|
||||||
/* Prevent integer overflow. */
|
/* Prevent integer overflow. */
|
||||||
if (++len == INT_MAX) {
|
if (++len == INT_MAX) {
|
||||||
sudo_warnx(U_("JSON_ARRAY too large"));
|
sudo_warnx("%s", U_("JSON_ARRAY too large"));
|
||||||
debug_return_ptr(NULL);
|
debug_return_ptr(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -444,7 +444,7 @@ iolog_parse_json_object(struct json_object *object, struct eventlog *evlog)
|
|||||||
/* First object holds all the actual data. */
|
/* First object holds all the actual data. */
|
||||||
item = TAILQ_FIRST(&object->items);
|
item = TAILQ_FIRST(&object->items);
|
||||||
if (item == NULL) {
|
if (item == NULL) {
|
||||||
sudo_warnx(U_("missing JSON_OBJECT"));
|
sudo_warnx("%s", U_("missing JSON_OBJECT"));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (item->type != JSON_OBJECT) {
|
if (item->type != JSON_OBJECT) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user