Suppress PVS Studio false positives.
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user