1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-23 22:52:34 +01:00

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.
This commit is contained in:
Christophe CURIS
2012-07-17 23:43:37 +02:00
committed by Carlos R. Mafra
parent 9f694b66b5
commit ac52d4de65

View File

@@ -493,6 +493,9 @@ static Bool menu_parser_include_file(WMenuParser parser)
fh = fopen(fullfilename, "rb"); fh = fopen(fullfilename, "rb");
if (fh != NULL) goto found_valid_file; if (fh != NULL) goto found_valid_file;
if (*src == ':')
src++;
} }
} }
WMenuParserError(parser, _("could not find file \"%s\" for include"), req_filename); WMenuParserError(parser, _("could not find file \"%s\" for include"), req_filename);