From ac52d4de6503bd22e3393e9a26bb1447c0576ff2 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Tue, 17 Jul 2012 23:43:37 +0200 Subject: [PATCH] Menu parser: fix possible infinite loop when loading menu file When a #include is used, the file is searched in many places; when the file was searched in the ':'-separated list of path it could led to infinite loop if the list contained more than one path and that the file was not found in the first path, the ':' separator was not properly passed over. --- WINGs/menuparser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WINGs/menuparser.c b/WINGs/menuparser.c index 96555cdf..b196a006 100644 --- a/WINGs/menuparser.c +++ b/WINGs/menuparser.c @@ -493,6 +493,9 @@ static Bool menu_parser_include_file(WMenuParser parser) fh = fopen(fullfilename, "rb"); if (fh != NULL) goto found_valid_file; + + if (*src == ':') + src++; } } WMenuParserError(parser, _("could not find file \"%s\" for include"), req_filename); -- 2.11.4.GIT