If the weights file pathname is longer than PATH_MAX, it may be written
past the end of the buffer on the stack; or it may be truncated when it
is written to allocated memory (such that it is not null-terminated).
Adjust the code to fix both issues. Dynamically allocate memory for the
actual length of the pathname so that it is not constrained by PATH_MAX.
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.
Finally fixed cancelling, which I broke some time ago in the quest
for speed. FB620P still doesn't abort nicely (firmware bug?).
* doc/sane-canon_pp.man: Added notes on FB620P problems.
* doc/descriptions/canon_pp.desc: Bumped version number.
backend/canon_pp-dev.h: Many changes: Bug fixes, less memory leaks (none left now?), more relaible, faster. Biggest changes are speculative reads (ask scanner to read more while data processing
occurs) and more reliable sending of commands. Slight performance
increase over previous version.
* doc/sane-canon_pp.man: Added discussion noting that scanning
greyscale in green is bad for colour.
possible, then feeds data to frontend. Results in large speed
increase in ECP mode. Also fixed problems with saned compatibility.
* backend/canon_pp.h: Added bytes_sent to scanner data structure.
* doc/sane-canon_pp.man: Discuss hardware problems at high
resolutions.
in xsane etc as a result.
* src/canon_pp.h: Tweaked up max buffer size to size avaialable in hardware.
* doc/descriptions/canon_pp.desc: increment version no.
models. Also corrected typo which caused full bed scans to fail. Disabled
problematic detect for now, will make detection slightly slower. Patch from
Matthew Duggan <stauff1@users.sourceforge.net>.
Henning Meier-Geinitz <henning@meier-geinitz.de>