sanei_config: malformed line can return NULL for token. We should check.

merge-requests/813/head
Ralph Little 2023-10-02 16:40:27 -07:00
rodzic ebb8152058
commit a617461c63
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 */