mirror of
https://git.yoctoproject.org/poky
synced 2026-05-07 16:59:22 +00:00
less: backport the fix for CVE-2022-46663
Upstream-Status: Backport from https://github.com/gwsw/less/commit/a78e1351113cef564d790a730d657a321624d79c (From OE-Core rev: 6cec065d795a562460c422947ac70c4a6f3f3175) Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
bcbb64e7af
commit
358d319cf5
@@ -0,0 +1,31 @@
|
||||
From a78e1351113cef564d790a730d657a321624d79c Mon Sep 17 00:00:00 2001
|
||||
From: Mark Nudelman <markn@greenwoodsoftware.com>
|
||||
Date: Fri, 7 Oct 2022 19:25:46 -0700
|
||||
Subject: [PATCH] End OSC8 hyperlink on invalid embedded escape sequence.
|
||||
|
||||
|
||||
CVE: CVE-2022-46663
|
||||
Upstream-Status: Backport [https://github.com/gwsw/less/commit/a78e1351113cef564d790a730d657a321624d79c]
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
line.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/line.c b/line.c
|
||||
index 0ef9b07..9d49cf8 100644
|
||||
--- a/line.c
|
||||
+++ b/line.c
|
||||
@@ -633,8 +633,8 @@ ansi_step(pansi, ch)
|
||||
/* Hyperlink ends with \7 or ESC-backslash. */
|
||||
if (ch == '\7')
|
||||
return ANSI_END;
|
||||
- if (pansi->prev_esc && ch == '\\')
|
||||
- return ANSI_END;
|
||||
+ if (pansi->prev_esc)
|
||||
+ return (ch == '\\') ? ANSI_END : ANSI_ERR;
|
||||
pansi->prev_esc = (ch == ESC);
|
||||
return ANSI_MID;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -26,6 +26,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
|
||||
DEPENDS = "ncurses"
|
||||
|
||||
SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
|
||||
file://CVE-2022-46663.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "6633d6aa2b3cc717afb2c205778c7c42c4620f63b1d682f3d12c98af0be74d20"
|
||||
|
||||
Reference in New Issue
Block a user