Subject: | Segfault with Kodak i1440 sanetwain driver |
Most unfortunately, I have to work with a Kodak i1440. Kodak has
supplied closed source, binary-only 32bit drivers. At least they work.
However, they do something that Sane doesn't expect:
sane_get_option_descriptor can return an opt->size=0. You don't check
for this in your code, and Perl is segfaulting.
Adding this before the malloc cures the segfault... for now.
if( 0==opt->size ) {
XSRETURN_UNDEF;
return;
}