hal: type bug in hal_hotplug.c
rml at ximian.com
Tue Mar 30 03:34:40 EEST 2004
On Mon, 2004-03-29 at 19:08, David Zeuthen wrote:
> Btw, these are still a bit off, since path is only PATH_MAX and strncat
> appends a maximum of PATH_MAX of src to dst, which means a potential
> buffer overflow - udev uses a macro to implement a sane strncat, maybe
> we should do the same?
We can. The macros that udev has are not overly efficient - they just
use "strlen()" to ensure proper buffer space. But we can do the same.
Attached patch adds a "strcat_len()" macro, which is similar to the safe
"strcat()" that udev has and then converts all "strncat()" users to it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1414 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20040329/2797748f/attachment.patch
More information about the xdg