[sane-devel] Network backend and lineart mode

Stef stef.dev at free.fr
Sat Aug 4 20:13:00 UTC 2012


On 31/07/2012 15:15, Aleksandr Dezhin wrote:
> On 07/30/2012 11:57 PM, Stef wrote:
>> could you send me the exact scanimage command you use on the client
>> side ?
>
> # scanimage -L
> device `genesys:libusb:002:003' is a Canon LiDE 210 flatbed scanner
> device `net:localhost:genesys:libusb:002:003' is a Canon LiDE 210 
> flatbed scanner
> # scanimage -d genesys:libusb:002:003 --mode Lineart --resolution 75 > 
> /dev/null                <- work
> # scanimage -d net:localhost:genesys:libusb:002:003 --mode Lineart 
> --resolution 75 > /dev/null  <- freeze until Ctrl+C
>
> Another example is somewhat strange behavior genesys backend over 
> network in same setup. Perhaps you find time to look at this problem. 
> Log files attached.
>
> # SANE_DEBUG_GENESYS=255 scanimage --help -d genesys:libusb:001:002 -A 
> > local.stdout 2> local.stderr         <- all ok in stdout
> # SANE_DEBUG_GENESYS=255 saned -d255 >saned.stdout 2> saned.stderr &
> # SANE_DEBUG_NET=255 scanimage --help -d 
> net:localhost:genesys:libusb:001:002 -A > net.stdout 2> net.stderr   
> <- stdout incomplete, segfault
> [1]+  Segmentation fault         saned -d255 1>saned.stdout 
> 2>saned.stderr
>
> When I try to get device options from remote host with sane 1.0.22, 
> scanimage halfway asks me to authorize and some non ASCII characters:
>
> (server) # SANE_DEBUG_GENESYS=255 saned -d255 >saned_remote.stdout 2> 
> saned_remote.stderr
> (client) # SANE_DEBUG_NETWORK=255 scanimage --help -d 
> SANE_DEBUG_NET=255 scanimage --help -d 
> net:192.168.0.176:genesys:libusb:001:002 >remote.stdout 2> remote.stderr
>
> But scanimage -d net:192.168.0.176:genesys:libusb:001:002 --mode Color 
> --resolution 75 > /dev/null works as expected without authorization.
>
>
>
     Hello,

     in some cases, the genesys backend returns more data than max_len 
in sane_read, which is wrong and crashes saned (buffer overflow). I am 
going to put a temporary fix, since the rewrite needed is too big for 
SANE 1.0.23.

Regards,
     Stef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120804/4a6f0f6c/attachment.html>


More information about the sane-devel mailing list