kopia lustrzana https://gitlab.com/sane-project/backends
Avoid reading uninitialized memory when checking SANE_CONFIG_DIR
rodzic
9e40af43a2
commit
a1cacda510
|
@ -96,7 +96,7 @@ sanei_config_open (const char *filename)
|
|||
if (dir_list)
|
||||
{
|
||||
len = strlen (dir_list);
|
||||
if (dir_list[len - 1] == DIR_SEP[0])
|
||||
if ((len > 0) && (dir_list[len - 1] == DIR_SEP[0]))
|
||||
{
|
||||
/* append default search directories: */
|
||||
mem = malloc (len + sizeof (DEFAULT_DIRS));
|
||||
|
|
Ładowanie…
Reference in New Issue