kopia lustrzana https://gitlab.com/sane-project/backends
Fixed config_line[len-1] bug which could generate an access
violation if len==0. Henning Meier-Geinitz <henning@meier-geinitz.de>DEVEL_2_0_BRANCH-1
rodzic
a0b9f501f8
commit
d24bbc4398
|
@ -3166,8 +3166,6 @@ sane_init (SANE_Int *version_code, SANE_Auth_Callback authorize)
|
|||
if (line[0] == '#') /* ignore line comments */
|
||||
continue;
|
||||
len = strlen (line);
|
||||
if (line[len - 1] == '\n')
|
||||
line[--len] = '\0';
|
||||
|
||||
if (!len)
|
||||
continue; /* ignore empty lines */
|
||||
|
|
|
@ -46,6 +46,11 @@ static const char RCSid[] = "$Header$";
|
|||
/* ------------------------------------------------------------------------- */
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.4 2001/05/31 18:01:39 hmg
|
||||
* Fixed config_line[len-1] bug which could generate an access
|
||||
* violation if len==0.
|
||||
* Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
*
|
||||
* Revision 1.3 2000/08/12 15:09:17 pere
|
||||
* Merge devel (v1.0.3) into head branch.
|
||||
*
|
||||
|
@ -248,10 +253,6 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
if (dev_name[0] == '#')
|
||||
continue;
|
||||
len = strlen (dev_name);
|
||||
if (dev_name[len - 1] == '\n')
|
||||
{
|
||||
dev_name[--len] = '\0';
|
||||
}
|
||||
if (!len)
|
||||
continue;
|
||||
sanei_config_attach_matching_devices (dev_name, attach_one);
|
||||
|
|
|
@ -45,6 +45,11 @@ static const char RCSid[] = "$Header$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.4 2001/05/31 18:01:39 hmg
|
||||
* Fixed config_line[len-1] bug which could generate an access
|
||||
* violation if len==0.
|
||||
* Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
*
|
||||
* Revision 1.3 2000/08/12 15:09:38 pere
|
||||
* Merge devel (v1.0.3) into head branch.
|
||||
*
|
||||
|
@ -245,10 +250,6 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
if (dev_name[0] == '#')
|
||||
continue;
|
||||
len = strlen (dev_name);
|
||||
if (dev_name[len - 1] == '\n')
|
||||
{
|
||||
dev_name[--len] = '\0';
|
||||
}
|
||||
if (!len)
|
||||
continue;
|
||||
sanei_config_attach_matching_devices (dev_name, attach_one);
|
||||
|
|
Ładowanie…
Reference in New Issue