2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-05 00:35:14 +00:00

sudoers plugin: silence most -Wconversion warnings.

This commit is contained in:
Todd C. Miller
2023-07-07 15:07:04 -06:00
parent 4891f37a45
commit a38b714667
58 changed files with 352 additions and 322 deletions

View File

@@ -87,8 +87,9 @@ linux_audit_command(char *const argv[], int result)
goto done;
}
for (av = argv, cp = command; *av != NULL; av++) {
n = strlcpy(cp, *av, size - (cp - command));
if (n >= size - (cp - command)) {
const size_t rem = size - (size_t)(cp - command);
n = strlcpy(cp, *av, rem);
if (n >= rem) {
sudo_warnx(U_("internal error, %s overflow"), __func__);
goto done;
}