Re: EOF detection

From: Marian Eichholz (marian.eichholz@freenet-ag.de)
Date: Tue May 08 2001 - 09:44:26 PDT

  • Next message: Nick Lamb: "Re: EOF detection"

    Oliver Rauch wrote:

    > > So you can't return data if you don't return SANE_STATUS_GOOD.
            
    Thank You, Oliver, after I changes the EOF policy, our backend works
    "smooth like wodka" (Pitr).

    > Yes, but you also can argue that SANE_STATUS_EOF is not a failure,
    > only the info that there is no more data than returned by
    > this sane_read command. It does not hurt to mention it explictly.

    By the way: Thank You for Xsane 0.76. It's getting nicer and nicer :-)

    I did't look into the new scanning code, but 0.74 had in fact a
    vulnerability (buffer overrun), if the backend offers actually more data
    than was precalculated by the front end.

    This is/was really a bug in the front end Xsane, because the parameters
    to sane_read (aount of data requestet) don't mention the coming end of
    the buffer (always requesting 64K/8K).

    By *very* careful width/length prediction (and some paranoia checks) the
    client can avoid the buffer smashing, but IMHO this is not the best way
    to make the tiers robust (you have to trust the scanner). GIGO would be
    perhaps better.:-)

    Mit freundlichen Gruessen / Yours sincerely

    Marian Eichholz

    - - - - - - - - - - -
    Marian Eichholz
    Postmaster
    freenet.de AG Vorsitzender des Aufsichtsrates: Gerhard Schmid
    Deelbögenkamp 4c Vorstand: Eckhard Spoerr (Vors.), Axel Krieger
    22297 Hamburg Amtsgericht Hamburg, HRB 74048

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



    This archive was generated by hypermail 2b29 : Tue May 08 2001 - 09:33:44 PDT