[Bug 29099] LabView 2011 demo crashes on start (PathRemoveExtensionA/W unconditionally tries to null terminate string)

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Apr 9 17:03:06 CDT 2012


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

Carlo Bramini <carlo.bramix at libero.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlo.bramix at libero.it

--- Comment #3 from Carlo Bramini <carlo.bramix at libero.it> 2012-04-09 17:03:06 CDT ---
I tried to do some debugging on this bug and I discovered that
PathRemoveExtension() crashes on Windows too if a constant string like
"labview.txt"is given as parameter, but it does not if the parameter is just
"labview": still constant but without dot and extension.

The implementation of PathRemoveExtensionA/W in the source of WINE is using
PathFindExtensionA/W for finding the extension to be removed; according to
MSDN:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb773587%28v=vs.85%29.aspx

"Returns the address of the "." that precedes the extension within pszPath if
an extension is found, or the address of the terminating null character
otherwise."

So, the only logical explanation I can think on this behavior is that the
function does not write the NUL character if it is already existing at the
given position. This condition makes lucky working the function, but the reason
why LabView is feeding a constant string is a bit unknown to me...

I have posted a patch here about this bug:

http://source.winehq.org/patches/data/85297

Sincerely,

Carlo Bramini.

-- 
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