mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
Format string bug in WMenuParserError
There is a format string (FS) bug in the function WMenuParserError.
It is the tipical FS bug, like printf(a) instead of printf("%s", a);
See http://en.wikipedia.org/wiki/Uncontrolled_format_string for more info.
This commit is contained in:
committed by
Carlos R. Mafra
parent
448a68c6d2
commit
fae81bf518
@@ -102,7 +102,7 @@ void WMenuParserError(WMenuParser parser, const char *msg, ...)
|
||||
va_start(args, msg);
|
||||
vsnprintf(buf, sizeof(buf), msg, args);
|
||||
va_end(args);
|
||||
__wmessage("WMenuParser", parser->file_name, parser->line_number, WMESSAGE_TYPE_WARNING, buf);
|
||||
__wmessage("WMenuParser", parser->file_name, parser->line_number, WMESSAGE_TYPE_WARNING, "%s", buf);
|
||||
|
||||
for (parent = parser->parent_file; parent != NULL; parent = parent->parent_file)
|
||||
__wmessage("WMenuParser", parser->file_name, parser->line_number, WMESSAGE_TYPE_WARNING,
|
||||
|
||||
Reference in New Issue
Block a user