Re: Snapscan ... again

From: regis rampnoux (regisr@pobox.com)
Date: Sat May 12 2001 - 08:28:28 PDT

  • Next message: Jim Ford: "Virtual Reality Software?"

    I apologize for this message but I dont understand the following test:

    in snapscan.c
    function sane_open

                pss->devname = strdup (name);
                if (!name)
                {
                    free (*h);
                    DBG (DL_MAJOR_ERROR,
                         "%s: out of memory copying device name.\n",
                         me);
                    return SANE_STATUS_NO_MEM;
                }

    Why are you testing 'name' and not pss->devname?
    name is the first function argument.

    I don't understand also why in this function a temporary file is created and
    unlinked but closed later... and some write can may be happen! The file
    will be destroyed when closing but in the same source file it is a little
    strange (but should work).

    -- 
    <regisr>       regisr@pobox.com     http://regisr.regix.com/
    Le mag: http://www.regix.com/
    

    -- 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 : Sat May 12 2001 - 08:16:13 PDT