Avoid a false positive. Coverity CID 104056.
This commit is contained in:
@@ -964,8 +964,7 @@ rebuild_env(void)
|
|||||||
* from user's environment.
|
* from user's environment.
|
||||||
*/
|
*/
|
||||||
if (ISSET(sudo_mode, MODE_LOGIN_SHELL) || !ISSET(didvar, KEPT_MAIL)) {
|
if (ISSET(sudo_mode, MODE_LOGIN_SHELL) || !ISSET(didvar, KEPT_MAIL)) {
|
||||||
cp = _PATH_MAILDIR;
|
if (_PATH_MAILDIR[sizeof(_PATH_MAILDIR) - 2] == '/') {
|
||||||
if (cp[sizeof(_PATH_MAILDIR) - 2] == '/') {
|
|
||||||
if (asprintf(&cp, "MAIL=%s%s", _PATH_MAILDIR, runas_pw->pw_name) == -1)
|
if (asprintf(&cp, "MAIL=%s%s", _PATH_MAILDIR, runas_pw->pw_name) == -1)
|
||||||
goto bad;
|
goto bad;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user