SCM

[#315491] [Patch] Device not set to unitialized on sane_close

View Trackers | Bugs | Export CSV

Date:
2016-09-09 21:13
Priority:
3
State:
Open
Submitted by:
Sandro Mani (smani-guest)
Assigned to:
St├ęphane Voltz (stefdev-guest)
Category:
backends (drivers)
Group:
None
Resolution:
None
Summary:
[Patch] Device not set to unitialized on sane_close

Detailed description
sane_close in genesys.c does not set dev->already_initialized to false. This causes a crash when using the scanner a second time in the same session, since i.e. the gamma tables are deallocated on sane_close, but are not re-allocated on sane_open since dev->already_initialized is still true after sane_close (and the gamma table and other stuff is only initialized if dev->already_initialized=false).

Trivial patch attached.

There are various downstream reports of this bug, i.e.:
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1557812
https://bugs.launchpad.net/ubuntu/+source/simple-scan/+bug/1441457
https://bugzilla.redhat.com/show_bug.cgi?id=1191663
etc

Followups: Sort comments antichronologically

No Followups Have Been Posted

Attached Files:

Attachments:
Size Name Date By Download
458 bytessane_already-initialized.patch2016-09-09 21:14smani-guestsane_already-initialized.patch

Changes:

Field Old Value Date By
assigned_tonone2016-09-25 13:29kitno-guest
File Added7191: sane_already-initialized.patch2016-09-09 21:14smani-guest
Powered By FusionForge