hpaio backend writes to fd 0, breaks saned/net
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
Invalid
|
Undecided
|
Unassigned | ||
hplip (Debian) |
Won't Fix
|
Unknown
|
Bug Description
Forwarded from: http://
From: Julien BLACHE <email address hidden>
To: <email address hidden>
Cc: <email address hidden>, <email address hidden>, <email address hidden>
Subject: Re: Bug#495005: xsane segfaults
Date: Wed, 13 Aug 2008 21:36:51 +0200
reassign 495005 hplip 2.8.6-2
retitle 495005 hpaio backend writes to fd 0, breaks saned/net
severity 495005 important
thanks
Julien Danjou <email address hidden> wrote:
Hi hplip folks,
>> That kind of segfault in the net protocol stack is usually due to a
>> standard violation by the remote backend.
> Acually, I managed to get it work using saned -a, so I can't get any
> debug value which might help, since inetd mode does not support debug.
>
> Using saned from inetd still make the remote xsane/xscanimage to
> ask for authentication and then segfault.
This is a clear indication that the hpaio backend is writing to fd 0.
It's a bug in the code, either a fd declared static that's not
initialized to -1, or an fd explicitely initialized to 0, or, more
likely, the fd member of a struct that gets memset() after allocation
and is not properly initialized to -1 afterwards.
In any case, this breaks saned when run through inetd which is
guaranteed to render hpaio unusable over the network with the net
backend as whatever is written to fd 0 will confuse the hell out of
the net protocol stack.
JB.
Changed in hplip: | |
status: | Unknown → Confirmed |
Changed in hplip (Debian): | |
status: | Confirmed → Won't Fix |
Changed in hplip (Debian): | |
status: | Won't Fix → Confirmed |
Changed in hplip (Debian): | |
status: | Confirmed → Won't Fix |
Show me the code :)
Hpaio has no io that writes to stdout. If you set SANE_DEBUG_DLL the sanei_init_debug() will write to stderr.
-dave