Zebediah Figura (@zfigura) commented about dlls/msado15/filter.l:
+ int len; + + TRACE("(%s)\n", debugstr_w(filter)); + memset(&p, 0, sizeof(parser_param)); + p.recordset = recordset; + + yylex_init(&p.yyscanner); + yyset_extra(&p, p.yyscanner); + + len = WideCharToMultiByte(CP_ACP, 0, filter, wcslen(filter)+1, 0, 0, NULL, NULL); + str = malloc(len); + + len = WideCharToMultiByte(CP_ACP, 0, filter, wcslen(filter)+1, str, len, NULL, NULL); + + buffer = yy_scan_string(str, p.yyscanner); + yyparse(&p, p.yyscanner); You probably want to check the return value, which is 1 in the case of a parse error and 2 in an out-of-memory condition. In some lexers I've written parse errors are handled specially, but that's not done here yet at least, and you probably want to catch the out-of-memory condition anyway.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2498#note_28138