mirror of
https://github.com/gryf/wmaker.git
synced 2026-05-11 19:48:35 +02:00
d356baebea
readMenuPipe() was calling freeline() on stuff which might be uninitialised, causing a crash if no valid input was read. readMenuPipe() was trying to snprintf() on an uninitialised pointer. We now use a fixed-length buffer like the other readMenu*() functions. Various memory leaks in readMenu*() functions have been fixed. There are still some lurking around but most have been removed. The original report from Charles Philip Chan <cpchan@bell.net> on 22 May 2012 says that: "Window Maker crashes when I try to open a sub-menu auto-generated by using: xdg_menu --format WindowMaker --charset UTF-8" There was also a report from Amadeusz Sławiński <amade@asmblr.net> on 24 May 2012 stating that wmaker crashes using: % cat test.sh cat << EOF Test MENU stuff EXEC true Test END EOF % grep test GNUstep/Defaults/WMRootMenu ("Generated Submenu", OPEN_MENU, "|| /home/amade/test.sh") Error is: wmaker(MonitorLoop(monitor.c:134)): warning: Window Maker exited due to a crash (signal 11) and will be restarted.