Suppress PVS Studio false positives.

This commit is contained in:
Todd C. Miller
2021-02-08 16:31:03 -07:00
parent 63d043fae2
commit 91351d57f4

View File

@@ -117,7 +117,7 @@ json_array_to_strvec(struct json_object *array)
}
/* Prevent integer overflow. */
if (++len == INT_MAX) {
sudo_warnx(U_("JSON_ARRAY too large"));
sudo_warnx("%s", U_("JSON_ARRAY too large"));
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. */
item = TAILQ_FIRST(&object->items);
if (item == NULL) {
sudo_warnx(U_("missing JSON_OBJECT"));
sudo_warnx("%s", U_("missing JSON_OBJECT"));
goto done;
}
if (item->type != JSON_OBJECT) {