cvs commit: src/sys/sys syslimits.h src/lib/libc/gen ttyname.c

Joerg Sonnenberger joerg at britannica.bec.de
Tue Aug 23 13:22:28 PDT 2005


On Tue, Aug 23, 2005 at 10:44:24AM -0700, Matthew Dillon wrote:
>   Add a TTY_PATH_MAX limit, set to 256, and reduce the size of the ttyname
>   static buffer from 1024 to a more reasonable TTY_PATH_MAX.

What do you worry about? A few bytes in statically linked program? A few
bytes for dynamically linked programs? In both cases, the change should
be initialisation of static_buf at the time of first use, making it go
to BSS by default.

The change just adds/keeps an undocumented, arbitrary limit in libc.
This is a *path name*, so it should be limited by the name of path names
and nothing else.

Joerg





More information about the Commits mailing list