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.