]> git.ipfire.org Git - thirdparty/libarchive.git/commit
unzip: do not use getenv() and setenv() in test_I.c (#2177)
authorMartin Matuška <martin@matuska.org>
Fri, 10 May 2024 01:00:33 +0000 (03:00 +0200)
committerGitHub <noreply@github.com>
Fri, 10 May 2024 01:00:33 +0000 (18:00 -0700)
commitd517c678b8c0e73537db2b14a2b7b7bf1feefb5f
treeaa2ddebccd56d089d52978c8a342e3e54bf958d4
parenteac15e252010c1189a5c0f461364dbe2cd2a68b1
unzip: do not use getenv() and setenv() in test_I.c (#2177)

This setenv() call may clobber the memory pointed to by lang.

It is also insufficient, since you don't run in a clean environment, so
LANG may be overridden by an inherited LC_ALL or LC_CTYPE, or by the
user's .profile (remember that system() does not execute the command
directly, but passes it to a shell).

Reported-By: dag-erling (quoting)
unzip/test/test_I.c