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:
parent
b58d33c1a3
commit
b3e7a18433
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue