Merge branch '708-possible-segv-null-pointer-deref-in-sanei_configure_attach' into 'master'

Resolve "Possible SEGV (null pointer deref) in sanei_configure_attach()"

Closes #708

See merge request sane-project/backends!802
merge-requests/813/head
Ralph Little 2023-10-02 23:47:59 +00:00
commit fd7b83c8f7
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -295,6 +295,12 @@ sanei_configure_attach (const char *config_file, SANEI_Config * config,
* So we parse the line 2 time to find an option */
/* check if it is an option */
lp = sanei_config_get_string (lp, &token);
if (NULL == token)
{
// Invalid format?
continue;
}
if (strncmp (token, "option", 6) == 0)
{
/* skip the "option" token */