[Bug 19839] Access violation when closing ImgBurn 2.5.0.0 if its 'Disc Layout Editor' window has ever been opened.

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Aug 25 19:26:49 CDT 2009


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





--- Comment #6 from LIGHTNING UK! <lightning_uk at imgburn.com>  2009-08-25 19:26:48 ---
I haven't looked at anything except your patch (i.e no actual source code) but
wouldn't you simply have to 'return 0;' rather than 'return -1' ? You can't
copy '-1' characters into the buffer so '-1' isn't a valid return value
(according to MSDN anyway - and as you pointed out earlier).

The bit in your patch where you memcpy looks like it could cause its own access
violation if 'size' is larger than the length of 'infoPtr->parts[0].text' - no
?

>>  memcpy (buf, infoPtr->parts[0].text, (size - 1) * sizeof(WCHAR));

and along the same line, why is this being used (again, I've NOT looked at the
source code, just what I can see in your patch!)...

>>          strcpyW (buf, infoPtr->parts[0].text);

...rather that one that takes into account the actual max length of 'buf' (as
specified by the 'size' parameter) - strLcpyW or whatever it would be called.

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