19 Aug
2025
19 Aug
'25
4:23 p.m.
Esme Povirk (@madewokherd) commented about dlls/sane.ds/cfg.c:
+ CloseHandle(hFile); + + sprintf(search, "%s=", name); + context = NULL; + line = strtok_s(content, "\n", &context); + found = FALSE; + + while (line) + { + if (strstr(line, search) == line) + { + CHAR* val_start = line + strlen(search); + CHAR* space = strchr(val_start, ' '); + + if (space) + *space = '\0'; Ignoring anything after the first space in a string is odd.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8778#note_113168