Opened 17 years ago

Closed 13 years ago

#183 closed defect (fixed)

libc: iconv uses alloca regardless of size

Reported by: bird Owned by: bird
Priority: normal Milestone: libc-0.6.4
Component: libc Version: 0.6
Severity: normal Keywords: iconv stack overflow
Cc:

Description

iconv uses alloca to allocate a temporary buffer regardless of whether the input is 2 bytes or 2MBs. It should be changed to use malloc for buffers larger than a few KBs so that we don't run out of stack.

Change History (3)

comment:1 Changed 13 years ago by bird

Status: newassigned

comment:2 Changed 13 years ago by bird

(In [3705]) iconv.c: Use malloc instead of alloca for larger strings so we don't blow up the stack. References #183.

comment:3 Changed 13 years ago by bird

Resolution: fixed
Status: assignedclosed

(In [3706]) 0.6: Backported r3705: iconv.c: Use malloc instead of alloca for larger strings so we don't blow up the stack. Fixes #183.

Note: See TracTickets for help on using tickets.