[sane-devel] Xsane Crashes with Epson 4180 Scanner

2004-10-15 Thread Olaf Meeuwissen
Karl Heinz Kremer k...@khk.net writes:

 It looks like this scanner does not speak the ESC/I protocol. At
 least not any flavor that the EPSON backend supports. Maybe Olaf can
 shed some light on this.

I guess I could ;-)

As the EPSON drivers say, this is a GT-F600.  It does not speak ESC/I.
It will be supported by iscan's epkowa backend in the near future (but
first we'll get a release for a bunch of all-in-ones).

FYI, it is closely related to the GT-9400 (Perfection 3170 PHOTO)
which is supported as of iscan-1.6.0.
 
 On Oct 14, 2004, at 7:30 PM, Matt Reuther wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On Thursday 14 October 2004 01:32 pm, Henning Meier-Geinitz wrote:

 [SNIP]

 Ok. Just to be safe, comment out v4l in dll.conf.

 Done.

 [SNIP]

 If you start gimp from a console window, I guess you would have seen
 an error message or even a debug trace.

 The log still points to reading the option descriptor but I'm not sure
 if it's an xsane or epson backend problem.

 I ran gimp from the console and captured a log. It's attached. All I
 did in
 gimp was pick File - Acquire - Xsane: epson:libusb:004:002, and then
 quit.

 Checking if it happens with scanimage may help.

 Try something like
 export SANE_DEBUG_EPSON=255
 scanimage -d epson -y 50 -x 50 /tmp/image.pnm 2log

 I did this and attached the output.

 If it's an xsane problem, setting XSANE_DEBUG=something may also help.
 However, that can create insane amounts of logs.

 Let me know if you want me to try this.

 Bye,
   Henning

 Matt
 - --
 Matt Reuther
 mreut...@umich.edu
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.4 (GNU/Linux)

 iD8DBQFBbwwXFse4xrb7oagRAnAYAKD6ONSmY12lFijcOxMYa0EgPX29XwCfReot
 RNpjsAqHKVYzK3RfUukRTSY=
 =UUEv
 -END PGP SIGNATURE-
 scanimagelog-epson4180.txt.bz2gimplog-epson4180.txt.bz2


-- 
Olaf MeeuwissenEPSON KOWA Corporation, PF1
FSF Associate Member #1962   sign up at http://member.fsf.org/
GnuPG key: 6BE37D90/AB6B 0D1F 99E7 1BF5 EB97  976A 16C7 F27D 6BE3 7D90
Penguin's lib!   -- I hack, therefore I am --   LPIC-2



[sane-devel] saned array memory limit

2004-10-15 Thread Olaf Meeuwissen
Julien BLACHE j...@jblache.org writes:

 Henning Meier-Geinitz henn...@meier-geinitz.de wrote:

 I have already thought about using automake to generate the makefiles
 but I guess we would need lots of special rules at least for backend/.

 Yes, it'd take some time to get it up  running...

Hmm, iscan still uses the build infra-structure (Makefile.in etc) from
sane-backends, but in my free time I've switched it over to use
automake (and I'm trying to get it included in our official releases).

Maybe, just maybe, I could see if generalising to multiple backends is
feasible.  Let me know if you're interested.

BTW, I'll also try to update epkowa.desc before sane-backends-1.0.15
comes out.
-- 
Olaf MeeuwissenEPSON KOWA Corporation, PF1
FSF Associate Member #1962   sign up at http://member.fsf.org/
GnuPG key: 6BE37D90/AB6B 0D1F 99E7 1BF5 EB97  976A 16C7 F27D 6BE3 7D90
Penguin's lib!   -- I hack, therefore I am --   LPIC-2



[sane-devel] Problem with Olivetti Job_Jet M400

2004-10-15 Thread Livhu Tshisikule
Hi,

I am a newbie to SANE, I have an Olivetti Job_Jet M400 (MFP) connected to a 
machine running Fedora 2. (I am also new to Linux but have Unix experience), 
at the moment I can only print but not scan. (It is powered by HP, I think it 
must be compatible to an HP scanner).

I have been searching the net without any luck. Can somebody help? 

Regards 
Livhu Tshisikule




[sane-devel] Problem with Olivetti Job_Jet M400

2004-10-15 Thread Livhu Tshisikule
Hi,

searching for SCSI scanners:
checking /dev/scanner... failed to open (Invalid argument)
checking /dev/sg0... failed to open (Invalid argument)
checking /dev/sg1... failed to open (Invalid argument)
checking /dev/sg2... failed to open (Invalid argument)
checking /dev/sg3... failed to open (Invalid argument)
checking /dev/sg4... failed to open (Invalid argument)
checking /dev/sg5... failed to open (Invalid argument)
checking /dev/sg6... failed to open (Invalid argument)
checking /dev/sg7... failed to open (Invalid argument)
checking /dev/sg8... failed to open (Invalid argument)
checking /dev/sg9... failed to open (Invalid argument)
checking /dev/sga... failed to open (Invalid argument)
checking /dev/sgb... failed to open (Invalid argument)
checking /dev/sgc... failed to open (Invalid argument)
checking /dev/sgd... failed to open (Invalid argument)
checking /dev/sge... failed to open (Invalid argument)
checking /dev/sgf... failed to open (Invalid argument)
checking /dev/sgg... failed to open (Invalid argument)
checking /dev/sgh... failed to open (Invalid argument)
checking /dev/sgi... failed to open (Invalid argument)
checking /dev/sgj... failed to open (Invalid argument)
checking /dev/sgk... failed to open (Invalid argument)
checking /dev/sgl... failed to open (Invalid argument)
checking /dev/sgm... failed to open (Invalid argument)
checking /dev/sgn... failed to open (Invalid argument)
checking /dev/sgo... failed to open (Invalid argument)
checking /dev/sgp... failed to open (Invalid argument)
checking /dev/sgq... failed to open (Invalid argument)
checking /dev/sgr... failed to open (Invalid argument)
checking /dev/sgs... failed to open (Invalid argument)
checking /dev/sgt... failed to open (Invalid argument)
checking /dev/sgu... failed to open (Invalid argument)
checking /dev/sgv... failed to open (Invalid argument)
checking /dev/sgw... failed to open (Invalid argument)
checking /dev/sgx... failed to open (Invalid argument)
checking /dev/sgy... failed to open (Invalid argument)
checking /dev/sgz... failed to open (Invalid argument)
  # No SCSI scanners found. If you expected something different, make sure 
that
  # you have loaded a SCSI driver for your SCSI adapter.

searching for USB scanners:
checking /dev/usb/scanner... failed to open (Invalid argument)
checking /dev/usb/scanner0... failed to open (Invalid argument)
checking /dev/usb/scanner1... failed to open (Invalid argument)
checking /dev/usb/scanner2... failed to open (Invalid argument)
checking /dev/usb/scanner3... failed to open (Invalid argument)
checking /dev/usb/scanner4... failed to open (Invalid argument)
checking /dev/usb/scanner5... failed to open (Invalid argument)
checking /dev/usb/scanner5... failed to open (Invalid argument)
checking /dev/usb/scanner7... failed to open (Invalid argument)
checking /dev/usb/scanner8... failed to open (Invalid argument)
checking /dev/usb/scanner9... failed to open (Invalid argument)
checking /dev/usb/scanner10... failed to open (Invalid argument)
checking /dev/usb/scanner11... failed to open (Invalid argument)
checking /dev/usb/scanner12... failed to open (Invalid argument)
checking /dev/usb/scanner13... failed to open (Invalid argument)
checking /dev/usb/scanner14... failed to open (Invalid argument)
checking /dev/usb/scanner15... failed to open (Invalid argument)
checking /dev/usbscanner... failed to open (Invalid argument)
checking /dev/usbscanner0... failed to open (Invalid argument)
checking /dev/usbscanner1... failed to open (Invalid argument)
checking /dev/usbscanner2... failed to open (Invalid argument)
checking /dev/usbscanner3... failed to open (Invalid argument)
checking /dev/usbscanner4... failed to open (Invalid argument)
checking /dev/usbscanner5... failed to open (Invalid argument)
checking /dev/usbscanner6... failed to open (Invalid argument)
checking /dev/usbscanner7... failed to open (Invalid argument)
checking /dev/usbscanner8... failed to open (Invalid argument)
checking /dev/usbscanner9... failed to open (Invalid argument)
checking /dev/usbscanner10... failed to open (Invalid argument)
checking /dev/usbscanner11... failed to open (Invalid argument)
checking /dev/usbscanner12... failed to open (Invalid argument)
checking /dev/usbscanner13... failed to open (Invalid argument)
checking /dev/usbscanner14... failed to open (Invalid argument)
checking /dev/usbscanner15... failed to open (Invalid argument)
found USB scanner (vendor=0x0b3c [Olivetti], product=0xa880 [Job_Jet M400]) at 
l
ibusb:003:002
  # Your USB scanner was (probably) detected. It may or may not be supported 
by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Scanners connected to the parallel port or other proprietary ports can't 
be
  # detected by this program.
done

Regards
Livhu Tshisikule




[sane-devel] Timetable for the release of sane-backends-1.0.15

2004-10-15 Thread Oliver Rauch
Hello.

I am not able to get access to the CVS server (permission denied).
Please could someone who has acces to the server take a look at that?!

I suggest to delay the feature freeze for some days when this
is not solved soon.

Best regards
Oliver

Am Die, 2004-10-05 um 13.32 schrieb Henning Meier-Geinitz:
 Hi,
 
 This is the timetable for the release of sane-backends 1.0.15
 
 2004-10-17 Feature freeze (snapshot)
 2004-10-31 Code freeze (snapshot)
 2004-11-07 Release
 
 Feature freeze means that only bug fixes and documentation updates are
 allowed. After code freeze only fixes of grave bugs that render a
 backend completely unusable or break compilation and documentation
 updates are accepted.
 
 If there are any new backends that should be included in that release
 please tell us NOW.
 
 Please everyone have a look at out growing list of bugs and fix as
 many bugs as possible:
 http://alioth.debian.org/tracker/index.php?group_id=30186atid=410366
 
 Or, if the bug report is bogus, close it.
 You can view only bugs assigned to you to reduce the number of visible
 bugs. Having a look at bugs assigned to nobody is also worth a try as
 some bugs affect several backends/maintainers. You can also sort by
 topic (Summary).
 
 Bye,
   Henning




[sane-devel] Xsane Crashes with Epson 4180 Scanner

2004-10-15 Thread Henning Meier-Geinitz
Hi,

On Fri, Oct 15, 2004 at 10:37:39AM +0900, Olaf Meeuwissen wrote:
 Karl Heinz Kremer k...@khk.net writes:
 
  It looks like this scanner does not speak the ESC/I protocol. At
  least not any flavor that the EPSON backend supports. Maybe Olaf can
  shed some light on this.
 
 I guess I could ;-)
 
 As the EPSON drivers say, this is a GT-F600.  It does not speak ESC/I.
 It will be supported by iscan's epkowa backend in the near future (but
 first we'll get a release for a bunch of all-in-ones).

I've added Perfection 4160 and GT-F600 as unsupported to our lists for
now (with some details from your mail).

Bye,
  Henning



[sane-devel] Problem with Olivetti Job_Jet M400

2004-10-15 Thread Henning Meier-Geinitz
Hi,

On Fri, Oct 15, 2004 at 02:47:15PM +0200, Livhu Tshisikule wrote:
 found USB scanner (vendor=0x0b3c [Olivetti], product=0xa880 [Job_Jet M400]) 
 at libusb:003:002

Thanks. 0x03bc is really Olivetti so they haven't just used a HP
device and printed a new logo on the case.

So I guess it won't work with hpoj without source code changes (if at
all).

Could you rerun sane-find-scanner and use -v -v (very verbose) this
time?

Bye,
  Henning




[sane-devel] [BUG] saned: missing input sanitization

2004-10-15 Thread Johannes Berg
--=-4jUAPFROJACgVt5tWrHO
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

SANE_NET_OPEN makes saned segfault if a NULL name is passed, because it
tries to strdup() the name without checking for !=3D NULL.

johannes

--=-4jUAPFROJACgVt5tWrHO
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-BEGIN PGP SIGNATURE-
Comment: Johannes Berg (SIP Solutions)

iQIVAwUAQW/U+aVg1VMiehFYAQIJ2xAAsItDNAE6jskDUoOptNrxmwvxMdjooCpx
haff88AIuXjKgWjsG27BxoLJJhw5v3S9uRLbOCx0q0oD4uIY1QuauBbncvIWlpS0
cqkEc2smmvDXyRP/uikIJGMaf9h45MuYttCBx9Irb+TZlc9X5IldReZBO2s7zMO+
M10MlPzwlJ8jEaQIykHTreEiLvj12WC+e7vTDM9K4uwwsU4/Ili8gm7v6Zs3aJ/Q
OEAZCTOPSXs+QYKi82E2souhh2eCt23HLWzn3Kt/G6FxakwJ26zGmySs5N0kItKL
0OGKQ4VYUS0w+nADJgFMm5CcB808yxm8WulONDlkIRybFghsbnfcxoPaKwMUGki7
00L9XlDmK6OBkalBpQ5h2rANEuw/QQET8kaChg3jA0PrSTTnJvgGt+mByAazzIOw
kVeIl0+AxZfMmsVvJdZzICnCDCrIj5YmHC7Vb5EeuO3XdkPifDEVQshL/z4AHoUQ
y6IbdndVfNie2DTedmRBB3/tsJx2ksZpR7mRAhpKv9bnKZyK7ppyWPkI1+brGBhb
RsV+I1TBz6KXAACumZ2CV+DwXx8l/EFdti16OfGdhRzMGjqkfGE7eZLDxOfv/INt
BSZ39j+ip6Sd1upA7VseidtJ48S8NNZNfm55nmH7ALjd+lcbLORGiHXDZazH5/FQ
2fOfBK6EVVM=
=s1YX
-END PGP SIGNATURE-

--=-4jUAPFROJACgVt5tWrHO--





[sane-devel] possible bin_w_string security issue (not)

2004-10-15 Thread Johannes Berg
--=-8KpxnP81NRNqGGtcVgwN
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I was going to write a mail without the (not) but then discovered that
this issue is actually a non-issue, but this is totally non-obvious.

Would you know off-hand why?

bin_w_string contains the following code:

  if (w-direction =3D=3D WIRE_DECODE)
{
  if (len =3D=3D 0)
*s =3D 0;
  else if (w-status =3D=3D 0)
*(*s + len - 1) =3D '\0';
}

If I interpret the code correctly, this could be used to bring the
server (running the binary protocol) into an invalid state:

1) send any kind of request that requires a string option at the end,
   for example SANE_NET_AUTHORIZE
2) tell the server that the length is 10 or so
3) send 9 bytes and close the connection

The server will react to this in the following way (if I interpret the
code correctly):
* during sanei_w_array it will notice that the status is
   bad and return
* bin_w_string will not(!) zero-terminate the string
   (because it is assuming that *s is not valid, while
   it actually is)
   sanei_w_array doesn't clear the array if anything
   item fails to read.
* now, the server has a password string that is not zero terminated,
   and strcpy()s that string accessing memory beyond the allocated size.


[Actually, I discovered this while I was documenting the wire protocol.
I think it is overly complex and the code badly structured, the wire's
direction thing is really strange!]





Ok, so here's the solution:

The server does
  signal (SIGPIPE, quit);

(which I think is actually another bug, why should sane_close,
sane_exit, sanei_w_exit and lots of other functions be async signal
safe?)

Still, this is that non-obvious that someone writing a server (or
client, which could then be attacked by a malevolent server) with the
sanei library functions could easily oversee this detail, ignore SIGPIPE
or use sockets that don't raise it.

Therefore I'm still sending this mail in hope that someone fixes the
sanei_w_array function to check for status !=3D 0 and clean up after
itself.

johannes

--=-8KpxnP81NRNqGGtcVgwN
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-BEGIN PGP SIGNATURE-
Comment: Johannes Berg (SIP Solutions)

iQIVAwUAQW/U16Vg1VMiehFYAQItGRAApmPf+qNwUfTzFswVVe1K10VSArYVmcOJ
1wN5J3zAhf9oC7gSavY5q2Y5gCZoyCj2+p+iSWf3sjDAV2+RH8WVIS34IItamOC8
zyj9g8/NgHtaF99tTi7/O2j0/3eMvr9t4/dipDZ7l83EI7C0ZYv2CsGX97dmdXf8
HPJo/9Tl4DA+UsBGMngGsj7flVrjf2zThkJzcPqEAgLv8v2Mv4LW5JNtxZIozgGM
LvLdRgYS7SVtt+owY+2bSLdW3V0dYp/QXwqHNXSvZfFHe1FT9AVZBwvF1573J14v
t+T3AwNV/qRxZC4d/0VD6JsPWJA11HFA3agutUK4TN1G10lH+1BkmoM8NXVWWy9p
9jh1G8FsQsPmnV1WGY6jy6JF4rFLARrjfCIefcDKQt5kEC8s9eMiT0+wayvUYZRr
bhO6oOgunMoPpNX3AxyvDhwzZ1uZmoied7QY+C783pY7kIWtZ45mFFCsznnX6FFN
jwhFjubDeyK03SxTzit7KsBy89wTLXqQIaKKR2IqXc9KlXEUp/UGMoEsQSjBBKth
pUSlKymbhp9kSni0DZ8LGX/G9gYhnK0yMxNUYVzBnp8GWuqC/IO/aHX2rR8n0y+W
ztf389uXOpGU7EHKRPW4NfHuzvnW2CZBN9/ReXwkrMPT4K3enB8dAsh3ipj7Ruzh
FaYv+5kkYgU=
=867r
-END PGP SIGNATURE-

--=-8KpxnP81NRNqGGtcVgwN--





[sane-devel] saned/sanei net bug

2004-10-15 Thread Johannes Berg
--=-b6utnWCS15VlnOe3728l
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

somehow saned/the sanei network layer seem to get buffering wrong.

For example, I send the following:

SANE_NET_INIT
SANE_NET_GET_DEVICES
SANE_NET_EXIT

If I don't wait for the result from SANE_NET_GET_DEVICES before sending
the control code for SANE_NET_EXIT, then the SANE_NET_EXIT code is
discarded.
I would assume that somewhere there's a buffering problem and the old
buffer is simply dropped when the direction is changed or something.

The following works:
(echo  -n -e \\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00 ;
sleep .1 ; echo -n -e \\00\\00\\x00\\x01 ; sleep 1 ;
echo -en \\x00\\x00\\x00\\x0A ) | nc localhost 6566 -q 1 | hd

while this doesn't:
(echo  -n -e \\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00 ;
sleep .1 ; echo -n -e \\00\\00\\x00\\x01\\x00\\x00\\x00\\x0A
)| nc localhost 6566 -q 1 | hd

I think this is extremely counter-intuitive. TCP never guarantees
message boundaries, so one wouldn't think that data is explicitly read
by the application but then discarded.

johannes

--=-b6utnWCS15VlnOe3728l
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-BEGIN PGP SIGNATURE-
Comment: Johannes Berg (SIP Solutions)

iQIVAwUAQW/YlaVg1VMiehFYAQLFPg//WIumi+9ZBodt1Ns31jdYGEiJa5z0hvkx
RivmO96L+BnL6Ld7Rut2mWx7ftE88yEhWnyzwBj3eFYseXi72n/2E12dpzyKyx+d
4ASxTTeatA/50Prdn2VzaPNe4zccKFpTJdYM7AXYDq3E49XyBrQ0fzin+rCaW0Pd
hjhD+bzzVuWxFxSgTsQn8T9z8h43W5BcUdD+a9fxZZMwRapXaFhTiFCTBxNH2zSI
yHCa7+Kx8xsGoTjsMt3BiggIn0k0ofNaSzht8BaYR0uelnKDEHrj+JdJgpfOz8OK
KcX3gPhsL5JdT4KbmuGyuJSkhZ9gdOGmneBkpX5WB/zUBvS8FxBLM0yyiAmqgzF1
rU9oqAg9psQgotkQY+koeJk8WnOHrstxgHX6rUO6Dbg2EIOv5tNDL/QZ1c/CAQY1
gcPf67was/FbFQ/WDhgyd4C3WdMDnaMrC9WZwIk1klxj6gFz0RqzcQbF97+s+OX0
yAgdl2V3b2SuYW9x9oojshxA6NN+yd3WrIhWxFFlOxkxrdoE1WGlPGwUvQwcVBja
KArLPRV4eHM6c8T0RyK6XWfC2aCOZ004EzTtPyOW8ARZZl026gGXNaF/jlw2L1PN
UiU8+spF5v4pBiQaiYmmEasGaaHmwHYL6oBI6PV2iMjUnFTz4dYM5EgyP3pSKypW
Ph0hiP5wYrc=
=L6hJ
-END PGP SIGNATURE-

--=-b6utnWCS15VlnOe3728l--





[sane-devel] weird message configuring sane-frontends

2004-10-15 Thread Johannes Berg
--=-Vnf8Fxo6iB28eSHM4qG1
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

[configure fails because it can't find sane-config]
You may need to remove /dev/null before you run configure again.

Clearly, that is not something you want to do.

johannes

--=-Vnf8Fxo6iB28eSHM4qG1
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-BEGIN PGP SIGNATURE-
Comment: Johannes Berg (SIP Solutions)

iQIVAwUAQW/YqKVg1VMiehFYAQKHHw/8C09hjnDLcF4l9sjKx8exSdTp+zlNoQn6
T7e5wAQ7KOEtMFJmqfE0zbNrYcZx/3u1mq+gqbCAvZNX6wTnVtQ/VHYzHRLw6b8X
TE2ebMFwV9QaF01tr5GilW6uBqtFPEm28Cd9dhN0mpN442FqZ9wG3Ekhx6BfnNLl
OSAu7ln2Eo2c0qI7Txq6vkm+unt/a+xuBD09tRBdMInpMOt+ozUB08LhOtm+iD3a
R0QZd7N6y6vvhndAKw/bvbzYs6asRhO324NLtj0aYJk9PK8fFdUCQj4FRV7lSPRH
55EdLCBzu+K/gGRPvIjzjy0iXhfo+ToKjoAyyAzjBEes28LeiygrpZhx5QdjTqJy
AYcrffYaOqcvawIrAym0PZp/+apkb4fMASERqZsAxoJI+yhUMrBDXe/o7tWhODGe
o+DQXjGIvSMwFZ8Qan2C6mZJoBV57j7qH8S597X8ipFqKO3gsDxDQTc/+NNwWWQ1
EAG4Bf+s5XkVbNpZh+i8/QCs09PmcERyuCqhe6/3D2IdUh+aBMvvVS24dw+oEZCP
6aqtcqgPHofqOEHjxhIdj1JFQYnwFVi6s+/rX/XUYeXFxfyT/n3PmU5vrLYyRQO5
8iQY04bcrQ1OJHaxKd/s8b+71M6z7zPhS5qxj1nqVUgiqa8rHNyRtDACjl4pQb7J
KSBLLrrPvUM=
=FagO
-END PGP SIGNATURE-

--=-Vnf8Fxo6iB28eSHM4qG1--