Esme Povirk (@madewokherd) commented about dlls/sane.ds/ui.c:
WideCharToMultiByte(CP_UTF8, 0, opt.title, -1, title, sizeof(title), NULL, NULL);
if (opt.type == TYPE_STRING && opt.constraint_type != CONSTRAINT_NONE) { CHAR buffer[255]; WCHAR *p;
BOOL is_exist = load_from_file(path, opt.type, title, buffer);
BOOL is_correct = FALSE;
for (p = opt.constraint.strings; *p; p += lstrlenW(p) + 1)
{
CHAR param[256]; SendMessageW( control,CB_ADDSTRING,0, (LPARAM)p );
WideCharToMultiByte(CP_UTF8, 0, p, -1, param, sizeof(param), NULL, NULL);
if (!strcmp(param, buffer))
This will access buffer uninitialized if the option is not in the file.