Skip to content

Commit cf3f0fa

Browse files
committed
Always use a format string with sudo_warnx().
Issue found by PVS-Studio.
1 parent 6fb4b36 commit cf3f0fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/sudoers/log_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ handle_commit_point(const TimeSpec *commit_point,
15391539

15401540
/* Check that ServerMessage's commit_point is valid. */
15411541
if (commit_point == NULL) {
1542-
sudo_warnx(U_("invalid ServerMessage"));
1542+
sudo_warnx("%s", U_("invalid ServerMessage"));
15431543
debug_return_bool(false);
15441544
}
15451545

@@ -1574,7 +1574,7 @@ handle_log_id(const char *id, struct client_closure *closure)
15741574
sudo_debug_printf(SUDO_DEBUG_INFO, "%s: remote log ID: %s", __func__, id);
15751575

15761576
if (id[0] == '\0') {
1577-
sudo_warnx(U_("invalid ServerMessage"));
1577+
sudo_warnx("%s", U_("invalid ServerMessage"));
15781578
debug_return_bool(false);
15791579
}
15801580

0 commit comments

Comments
 (0)