1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-08 23:04:15 +01:00
Files
wmaker/WINGs/menuparser.c
Christophe CURIS 9ad278ddf8 Menu parser: added boundary checks in the path-gen for #include file search
When generating the full path+name of file to search for a file
being #included, it was generated in a buffer that's supposedly
large enough (MAXLINE > 2*PATH_MAX). However, this limit has a few
issues (PATH_MAX seem to be able to be bigger, and worse: we can't
be sure we're given longer args).

The code was rewrote to natively include boundary checks so we're
sure we won't overflow the buffer. A few strncpy have been removed
because in this case they tend to make things harder to write.
2012-07-19 11:23:29 +01:00

17 KiB