Zebediah Figura (@zfigura) commented about dlls/msado15/filter.l:
+{
- char *str;
- parser_param p;
- YY_BUFFER_STATE buffer;
- int len;
- int ret;
- TRACE("(%s)\n", debugstr_w(filter));
- memset(&p, 0, sizeof(parser_param));
- p.recordset = recordset;
- len = WideCharToMultiByte(CP_ACP, 0, filter, wcslen(filter)+1, 0, 0, NULL, NULL);
- str = malloc(len);
- if (!str)
return 2; /* Out of Memory */
- len = WideCharToMultiByte(CP_ACP, 0, filter, wcslen(filter)+1, str, len, NULL, NULL);
You can use -1 instead of the explicit wcslen().