Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 131 by
stanisla...@smartcom.bg: UNIX_MAX_PATH wrong assumption in
konf/net/net.c
http://code.google.com/p/klish/issues/detail?id=131
Hi,
In konf/net/net.c, UNIX_MAX_PATH is defined as 108, which on FreeBSD should
be 104.
It appears that other projects have had similar issues, for example
lighttpd:
http://redmine.lighttpd.net/issues/713
Defining UNIX_MAX_PATH as 108 could lead to buffer overflow even on Linux,
should the developers decide to change the size of the char[] this refers
to (it does cause issues on FreeBSD).
The best way seems to be to use sizeof on the sun_path member of the
sockaddr_un struct (as in the patch).
I've tested both on FreeBSD and on Linux and klish compiles cleanly with
the patch.
Best wishes,
Stanislav
Attachments:
konf_net.diff 340 bytes
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings