[Bug 1791] New: wsprintf stack problem

Wine Bugs wine-bugs at winehq.com
Thu Oct 23 10:46:35 CDT 2003


http://bugs.winehq.com/show_bug.cgi?id=1791

           Summary: wsprintf stack problem
           Product: Wine
           Version: CVS
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-user
        AssignedTo: wine-bugs at winehq.com
        ReportedBy: mb at smartftp.com


This behavior can only reproduced with the SmartFTP developer build:
http://www.smartftp.com/get/SFTPDev.exe

wsprintfW("%ld", 1) produces something like "14000000" where 14000000 is a 
pointer to a variable on the stack. This value is always the same for multiple 
wsprintf calls in the same code part. 

from the code in wsprintf.c
arg_val(buffer, INT) returns "the" pointer (14000000).

Replacing the wsprintfW function with sprintfW (msvcrt function) solves the 
problem. (=> no stack corruption in SmartFTP)

My guess is that for some reason the wsprintf / arg_val function reads the 
wrong values from the stack. Stack corruption could only happen within the 
wsprintf function.

-Mat
SmartFTP.com

-- 
Configure bugmail: http://bugs.winehq.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list