Opened 6 years ago

Closed 6 years ago

#270 closed defect (fixed)

opendir() and a too long path

Reported by: komh Owned by: bird
Priority: normal Milestone: libc-0.6.6
Component: libc Version:
Severity: blocker Keywords:



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 6 years ago by bird

  • Component changed from baselayout to libc
  • Milestone set to libc-0.6.6
  • Priority changed from highest to normal
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3854.

Note: See TracTickets for help on using tickets.