MFS: Don't allow printf directives in PAGER
Obtained from: OpenBSD
This commit is contained in:
parent
e98e26cd69
commit
08e61f6489
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62726
@ -634,7 +634,7 @@ int length;
|
|||||||
if ((env_pager = getenv("PAGER")) == NULL) {
|
if ((env_pager = getenv("PAGER")) == NULL) {
|
||||||
snprintf(cmdbuf, sizeof(cmdbuf), _PATH_PAGER, Lpp);
|
snprintf(cmdbuf, sizeof(cmdbuf), _PATH_PAGER, Lpp);
|
||||||
} else {
|
} else {
|
||||||
snprintf(cmdbuf, sizeof(cmdbuf), env_pager);
|
snprintf(cmdbuf, sizeof(cmdbuf), "%s", env_pager);
|
||||||
}
|
}
|
||||||
outf = popen(cmdbuf, "w");
|
outf = popen(cmdbuf, "w");
|
||||||
if (!outf)
|
if (!outf)
|
||||||
|
Loading…
Reference in New Issue
Block a user