[Bug 34719] New: cabinet_open{,_stream} returns 0 on failure but doesn't compliant to _open interface

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Oct 14 08:34:03 CDT 2013


http://bugs.winehq.org/show_bug.cgi?id=34719

             Bug #: 34719
           Summary: cabinet_open{,_stream} returns 0 on failure but
                    doesn't compliant to _open interface
           Product: Wine
           Version: 1.7.4
          Platform: x86-64
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: msi
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: flast at flast.jp
    Classification: Unclassified


cabinet_open{,_stream} function returns 0 on failure, which function passed to
FDICreate.
Then, comments of FDICreate(in dlls/cabinet/fdi.c) says requirement of
callbacks.
I quote the comment about open callback:
<quote>
 *   pfnopen  [I]  A pointer to a function which opens a file.  Uses
 *                 the same interface as _open.
</quote>

And MSDN documentation describes about _open, what should be compliant to.
http://msdn.microsoft.com/en-us/library/z0kc8e3z(v=vs.110).aspx

I also quote the Return Value section.
<quote>
Each of these functions returns a file descriptor for the opened file. A return
value of -1 indicates an error, in which case errno is set to one of the
following values.
</quote>

Therefore, cabinet_open{,_stream} should return -1 on failure.
I attached a my candidate patch, please check it.

Thanks,

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list