Opened 11 years ago

Closed 10 years ago

#270 closed defect (fixed)

opendir() and a too long path

Reported by: KO Myung-Hun Owned by: bird
Priority: normal Milestone: libc-0.6.6
Component: libc Version:
Severity: blocker Keywords:
Cc:

Description

Hi/2.

opendir() assumes that a path length is enough smaller than MAXPATHLEN. So if a path length is longer than MAXPATHLEN, a stack is corrupted.

To fix this, nbuf should not be declared statically using MAXPATHLEN. Instead, it should be declared dynamically using malloc() in according to a length of 'name'.

Change History (1)

comment:1 Changed 10 years ago by bird

Component: baselayoutlibc
Milestone: libc-0.6.6
Priority: highestnormal
Resolution: fixed
Status: newclosed

Fixed in r3854.

Note: See TracTickets for help on using tickets.