[uClibc] ttyname patch

Gregory Nutt spudmonkey at racsa.co.cr
Sat Aug 30 03:00:49 UTC 2003


Erik,

Attached is a patch for a bug I found in libc/termios/ttyname.c. 
Essentially the length of the buffer is calculated incorrectly in a 
strncpy call and then the null terminator is placed on the byte after 
the buffer.

This probably cause some very strange behavior on my system (it ended up 
setting malloc's heapsize to zero) but may be innocuous on other systems.

Greg Nutt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uClibc-0.9.20-ttyname-patch
Url: http://lists.busybox.net/pipermail/uclibc/attachments/20030829/086b278b/attachment.diff 


More information about the uClibc mailing list