2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Make "internal error, %s overflow" arguments consistent, using

__func__ where possible (when debugging is allowed).
This commit is contained in:
Todd C. Miller
2014-04-01 16:42:13 -06:00
parent a1240a5417
commit 6a295400b7
7 changed files with 13 additions and 14 deletions

View File

@@ -286,12 +286,12 @@ sudo_putenv_nodebug(char *str, bool dupcheck, bool overwrite)
if (env.env_size > SIZE_MAX - 128) {
fatalx_nodebug(U_("internal error, %s overflow"),
"sudo_putenv_nodebug()");
"sudo_putenv_nodebug");
}
nsize = env.env_size + 128;
if (nsize > SIZE_MAX / sizeof(char *)) {
fatalx_nodebug(U_("internal error, %s overflow"),
"sudo_putenv_nodebug()");
"sudo_putenv_nodebug");
}
nenvp = realloc(env.envp, nsize * sizeof(char *));
if (nenvp == NULL) {
@@ -392,7 +392,7 @@ sudo_setenv2(const char *var, const char *val, bool dupcheck, bool overwrite)
strlcat(estring, "=", esize) >= esize ||
strlcat(estring, val, esize) >= esize) {
fatalx(U_("internal error, %s overflow"), "sudo_setenv2()");
fatalx(U_("internal error, %s overflow"), __func__);
}
rval = sudo_putenv(estring, dupcheck, overwrite);
if (rval == -1)