The config file argument needs to be freed when a device is not set.
That was missed for two occasions. The other occasion was freeing it
unconditionally leading to a use-after-free for the regular use case.
Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980311
This is the least intrusive fix. The code really wants to be refactored.
Tested with a Mustek 1200 UB Plus.
Backends use a mixture of SANE_CURRENT_{MAJOR | MINOR} and V_{MAJOR |
MINOR} with all kind of permutations. I was confused by this and one
comment in pieusb.c tells me I was not alone. Some items in old
changelogs suggest to use the SANE_CURRENT_ macros in backends, so let's
switch to do that with the exception of net.c and dll.c. Done with:
$ find backend -name '*.[ch]' | xargs sed -i '/nearly every/ ! { s/\<V_M/SANE_CURRENT_M/g }'
$ git checkout backend/net.c backend/dll.c
And manually removing the comment from pieusb.c. Everything still builds
fine.
With the exception of use in three quotes as well as our inlcuded copy
of the GPL, all use of the Free Software Foundation's postal address
has been removed.
Re #320.
The original issue that I had with this patch was in the cancel function
where the patch author had commented out the "stop scan" call for cancel.
This made no sense to me. I have put it back in for testing.
It might have been accidentally left out.
Ulf and I will review and test this patch on this branch.
It does seem to fix the issue, but I want to check it out a little more
before we commit it to master.
- GT68xx_Scanner is extended to hold calibration data for all
resolutions
- gt68xx_sheet_fed_calibrate loops over all resolution and color
mode, and stores result in scanner struct
- calibrators are created from stored data before each scan
- add a flag to handle the case of sheetfed scanners that will be
calibrated using a dedicated function that uses an external
calibration sheet
- enable image OPT_QUALITY_CAL for scanners with
GT68XX__FLAG_HAS_CALIBRATE
Source code was inconsistent on how they were referencing
include files in include/sane. In certain cases, sane/sane.h
and sane/saneopts.h was really including external copies (with
some preprocessor implementations anyways).
Global replace of u_int??_t with C9x standard based uintxx_t
in order to remove some tricky and overlapping portability logic
from acinclude.m4 and leave it in only m4/stdint.m4.
seems to be the same as 4 X, it just doesn't have buttons. Cleanup of .desc
file. Fixed gain setting. Mustek ScanExpress A3 USB 600 dpi color scanning works
now.