mirror of
https://github.com/openharmony/third_party_ncurses.git
synced 2026-07-01 13:20:30 -04:00
!19 [安全问题]: 安全漏洞CVE-2025-6141
Merge pull request !19 from HsuYao/master
This commit is contained in:
@@ -985,6 +985,8 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
|
||||
bp = tp->Strings[from_ptr->nte_index];
|
||||
if (VALID_STRING(bp)) {
|
||||
for (dp = buf2; *bp; bp++) {
|
||||
if ((size_t) (dp - buf2) >= (sizeof(buf2) - sizeof(TERMTYPE2)))
|
||||
break;
|
||||
if (bp[0] == '$' && bp[1] == '<') {
|
||||
while (*bp && *bp != '>') {
|
||||
++bp;
|
||||
|
||||
Reference in New Issue
Block a user