# Re: Possible fix for Sane 1.0.1 segfault in RedHat 5.1 (net)

Graham Stoney (greyham@research.canon.com.au)
Mon, 3 May 1999 11:18:36 +1000 (EST)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Bob van der Poel: "Re: xsane default sizes"
- Previous message: Ingo Wilken: "Re: May sane_init fail?"

Milon Firikis writes:
> I don't have any kind of bacckend (except net) enabled in my dll.conf.
> It still segfaults where it should return "no devices available)

OK; it sounds like we may have encountered completely different problems, and
that it's only a coincidence that we're both running Red Hat 5.1. Nevertheless,
I'd like to get my patches included in the official SANE release, as they do
fix the segfault that happens when the SANE_NET_CONTROL_OPTION RPC fails.

> true SANE_TYPE_INT!=SANE_TYPE_INT, but in practice this cannot lead to a
> SIGSEGV and most certainly it's not Redahat5.1 specific

I think you meant SANE_TYPE_INT != SANE_TYPE_BOOL, and of course you're
absolutely right; this won't cause a SIGSEGV. The patches to fix all the
occurances of this in the backends were more for completeness than anything.

> So I assume you don't use memset to clear the option descriptor space.

True; it seemed unnecessary, and (as it turns out) is masking the fact that
the "type" field isn't initialised correctly in many 1.0.1 backends.

> So you find a bug, but unfortuately is not applied to my problem (I
> tested your patch on the net.c and I failed).

Right again, I'm afraid; sorry I couldn't be more help. If I spot further
problems, I'll try to sort them out.

Regards,
Graham

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

- Next message: Bob van der Poel: "Re: xsane default sizes"
- Previous message: Ingo Wilken: "Re: May sane_init fail?"