mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
Handle the escaped colon \: in a capability.
PR: bin/30778 Reviewed by: ache, peter MFC after: 3 days
This commit is contained in:
parent
d837b36904
commit
f350abf814
@ -200,6 +200,7 @@ _nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
|
|||||||
tcs = pd - 1;
|
tcs = pd - 1;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
while ((tok = strsep(&ps, ":")) != NULL &&
|
while ((tok = strsep(&ps, ":")) != NULL &&
|
||||||
|
*(tok - 2) != '\\' &&
|
||||||
(*tok == '\0' || *tok == '\\' || !isgraph(*tok)))
|
(*tok == '\0' || *tok == '\\' || !isgraph(*tok)))
|
||||||
;
|
;
|
||||||
if (tok == NULL)
|
if (tok == NULL)
|
||||||
|
@ -200,6 +200,7 @@ _nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
|
|||||||
tcs = pd - 1;
|
tcs = pd - 1;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
while ((tok = strsep(&ps, ":")) != NULL &&
|
while ((tok = strsep(&ps, ":")) != NULL &&
|
||||||
|
*(tok - 2) != '\\' &&
|
||||||
(*tok == '\0' || *tok == '\\' || !isgraph(*tok)))
|
(*tok == '\0' || *tok == '\\' || !isgraph(*tok)))
|
||||||
;
|
;
|
||||||
if (tok == NULL)
|
if (tok == NULL)
|
||||||
|
@ -817,8 +817,9 @@ and
|
|||||||
.Sy \&\e\e .
|
.Sy \&\e\e .
|
||||||
If it is necessary to place a
|
If it is necessary to place a
|
||||||
.Sy \&:
|
.Sy \&:
|
||||||
in a capability it must be escaped in
|
in a capability it must be escaped as
|
||||||
octal as
|
.Sy \e:
|
||||||
|
or be encoded as
|
||||||
.Sy \&\e072 .
|
.Sy \&\e072 .
|
||||||
If it is necessary to place a
|
If it is necessary to place a
|
||||||
.Dv NUL
|
.Dv NUL
|
||||||
|
Loading…
Reference in New Issue
Block a user