Esme Povirk (@madewokherd) commented about dlls/sane.ds/ui.c:
WideCharToMultiByte(CP_UTF8, 0, p, -1, param, sizeof(param), NULL, NULL);if (is_exist && !strcmp(param, buffer)){is_correct = TRUE;}}if (is_exist && is_correct){sane_option_set_value(opt.optno, buffer, NULL);}if (!is_correct){ERR("%s=%s is incorrect. The default value is set!", title, buffer);}
We probably shouldn't print this if the setting doesn't exist (and I think it might use buffer uninitialized in that case).