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@winehq.org ReportedBy: flast@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,
http://bugs.winehq.org/show_bug.cgi?id=34719
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs@gmail.c | |om
--- Comment #1 from Sagawa sagawa.aki+winebugs@gmail.com 2013-10-15 09:05:27 CDT --- Could you send the patch to wine-patches? See http://wiki.winehq.org/SubmittingPatches for details.
http://bugs.winehq.org/show_bug.cgi?id=34719
--- Comment #2 from Kohei Takahashi flast@flast.jp 2013-10-15 10:47:25 CDT --- (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.
http://bugs.winehq.org/show_bug.cgi?id=34719
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com 2013-10-15 13:57:15 CDT --- Patch commited: http://source.winehq.org/git/wine.git/?a=commit;h=953359c73f5c609132e6d7caea...
http://bugs.winehq.org/show_bug.cgi?id=34719
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |953359c73f5c609132e6d7caea0 | |947d164a3d4b4 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #4 from Austin English austinenglish@gmail.com 2013-10-15 16:45:44 CDT --- Fixed.
http://bugs.winehq.org/show_bug.cgi?id=34719
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2013-10-25 12:54:57 CDT --- Closing bugs fixed in 1.7.5.
https://bugs.winehq.org/show_bug.cgi?id=34719
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.6.x
https://bugs.winehq.org/show_bug.cgi?id=34719
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.6.x |---
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Removing 1.6.x milestone from bugs included in 1.6.2.