19 Aug
2025
19 Aug
'25
4:23 p.m.
Esme Povirk (@madewokherd) commented about dlls/sane.ds/cfg.c:
+ + new_content = NULL; + found = FALSE; + + sprintf(search, "%s=", option->name); + if (content) + { + CHAR* lines[1000] = {0}; + int count = 0; + CHAR* context = NULL; + size_t new_size = 0; + CHAR* line; + + line = strtok_s(content, "\n", &context); + + while (line && count < 1000) Please don't duplicate the buffer length. You can use the `ARRAY_SIZE` macro.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8778#note_113164