mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
iconv: Fix a buffer overflow in the HZ encoding
wcrtomb may store up to 2 2-byte escape sequences to the state buffer in addition to the character itself. In the worst case, a 3-byte heap overflow is possible. Approved by: so Security: FreeBSD-SA-26:49.iconv Security: CVE-2026-58081 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57949
This commit is contained in:
1 parent
2ee2274244
commit
8bc3abb7d7
1 file changed
+1
-1
@@ -132,7 +132,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
escape_t *inuse;
|
||||
int chlen;
|
||||
char ch[ROWCOL_MAX];
|
||||
char ch[4 + ROWCOL_MAX];
|
||||
} _HZState;
|
||||
|
||||
#define _CEI_TO_EI(_cei_) (&(_cei_)->ei)
|
||||
|
||||
Reference in new issue
Block a user