kopia lustrzana https://gitlab.com/sane-project/backends
Explicitely initialize global variables to avoid segfaults when calling
sane_init/sane_exit more than once.merge-requests/1/head
rodzic
08af36a2e8
commit
8dedb6c862
|
@ -4,7 +4,9 @@
|
||||||
doc/descriptions/gt68xx.desc doc/gt68xx/gt68xx.CHANGES:
|
doc/descriptions/gt68xx.desc doc/gt68xx/gt68xx.CHANGES:
|
||||||
Added vid/pid 0x07b3/0x0400 to gt68xx.conf also. Added indormation
|
Added vid/pid 0x07b3/0x0400 to gt68xx.conf also. Added indormation
|
||||||
about Medion 4394. Mention ma1509 backend. Fix segfault when calling
|
about Medion 4394. Mention ma1509 backend. Fix segfault when calling
|
||||||
sane_open with an empty device name.
|
sane_open with an empty device name. Explicitely initialize global
|
||||||
|
variables to avoid segfaults when calling sane_init/sane_exit more
|
||||||
|
than once.
|
||||||
* backend/net.c doc/descriptions/net.desc: Initialize global variables
|
* backend/net.c doc/descriptions/net.desc: Initialize global variables
|
||||||
in sane_init to avoid segmentation faults when sane_init/sane_exit is
|
in sane_init to avoid segmentation faults when sane_init/sane_exit is
|
||||||
run more than once.
|
run more than once.
|
||||||
|
|
|
@ -932,6 +932,14 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
||||||
|
|
||||||
sanei_usb_init ();
|
sanei_usb_init ();
|
||||||
|
|
||||||
|
num_devices = 0;
|
||||||
|
first_dev = 0;
|
||||||
|
first_handle = 0;
|
||||||
|
devlist = 0;
|
||||||
|
new_dev = 0;
|
||||||
|
new_dev_len = 0;
|
||||||
|
new_dev_alloced = 0;
|
||||||
|
|
||||||
fp = sanei_config_open (GT68XX_CONFIG_FILE);
|
fp = sanei_config_open (GT68XX_CONFIG_FILE);
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
|
@ -1139,6 +1147,7 @@ sane_exit (void)
|
||||||
gt68xx_device_free (dev);
|
gt68xx_device_free (dev);
|
||||||
}
|
}
|
||||||
first_dev = 0;
|
first_dev = 0;
|
||||||
|
first_handle = 0;
|
||||||
if (devlist)
|
if (devlist)
|
||||||
free (devlist);
|
free (devlist);
|
||||||
devlist = 0;
|
devlist = 0;
|
||||||
|
|
|
@ -6,6 +6,8 @@ V 1.0-40 (2003-02-22)
|
||||||
- Added indormation about Medion 4394.
|
- Added indormation about Medion 4394.
|
||||||
- Mention ma1509 backend.
|
- Mention ma1509 backend.
|
||||||
- Fix segfault when calling sane_open with an empty device name.
|
- Fix segfault when calling sane_open with an empty device name.
|
||||||
|
- Explicitely initialize global variables to avoid segfaults when calling
|
||||||
|
sane_init/sane_exit more than once.
|
||||||
|
|
||||||
V 1.0-39 (2003-02-16)
|
V 1.0-39 (2003-02-16)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue