WineHQ
Bug Tracking Database – Bug 34719

 Bugzilla

 

Last modified: 2014-01-10 14:46:53 UTC  

cabinet_open{,_stream} returns 0 on failure but doesn't compliant to _open interface

Bug 34719 - cabinet_open{,_stream} returns 0 on failure but doesn't compliant to _open interface
cabinet_open{,_stream} returns 0 on failure but doesn't compliant to _open in...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: msi
1.7.4
x86-64 Linux
: P2 minor
: ---
Assigned To: Mr. Bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-10-14 08:34 UTC by Kohei Takahashi
Modified: 2014-01-10 14:46 UTC (History)
1 user (show)

See Also:
Regression SHA1:
Fixed by SHA1: 953359c73f5c609132e6d7caea0947d164a3d4b4
Distribution: ---
Staged patchset:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kohei Takahashi 2013-10-14 08:34:03 UTC
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,
Comment 1 Sagawa 2013-10-15 09:05:27 UTC
Could you send the patch to wine-patches?
See http://wiki.winehq.org/SubmittingPatches for details.
Comment 2 Kohei Takahashi 2013-10-15 10:47:25 UTC
(In reply to comment #1)
> Could you send the patch to wine-patches?
> See http://wiki.winehq.org/SubmittingPatches for details.

Thank you for suggestion. I'll send soon.
Comment 4 Austin English 2013-10-15 16:45:44 UTC
Fixed.
Comment 5 Alexandre Julliard 2013-10-25 12:54:57 UTC
Closing bugs fixed in 1.7.5.
Comment 6 Alexandre Julliard 2014-01-10 14:46:53 UTC
Removing 1.6.x milestone from bugs included in 1.6.2.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers