Pellesc 7.00.355 (Win64) swprintf Access Violation

Started by ghost, July 24, 2014, 04:41:33 AM

Previous topic - Next topic

ghost

Building with machine setting X86 the following is producing an access violation:

(UNICODE,_UNICODE) is defined

char sz[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // 68 chars = access violation , 67 chars = code runs fine
TCHAR szw[500] = _T("");
swprintf(szw,500,_T("%s"),sz);



With machine setting X64 the code runs without error. Version info is attached as image.

Pelle

Bleh. It's a buffer limit calculated as bytes (128), not wide characters (64), leading to a buffer overrun. Will fix it for version 8.0.
/Pelle