From d489095bcdf9603053ebd514588093a991605ffb Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 15:37:22 +0000 Subject: More string and fopen safety measures --- FoundationEx/MemDebug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FoundationEx') diff --git a/FoundationEx/MemDebug.cpp b/FoundationEx/MemDebug.cpp index ce8a63c..5030653 100644 --- a/FoundationEx/MemDebug.cpp +++ b/FoundationEx/MemDebug.cpp @@ -47,7 +47,7 @@ static void heapdump() hinfo._pentry = NULL; while ((heapstatus = _heapwalk( &hinfo )) == _HEAPOK) { - sprintf(report, "%6s block at %Fp of size %4.4X\n", + sprintf_s(report, "%6s block at %Fp of size %4.4X\n", ( hinfo._useflag == _USEDENTRY ? "USED" : "FREE" ), hinfo._pentry, hinfo._size); @@ -59,7 +59,7 @@ static void heapdump() avail += hinfo._size; } - sprintf(report, "------\nUsed Blocks: %d\nAvail Blocks: %d\nTotal Blocks: %d\n", used, avail, used+avail); + sprintf_s(report, "------\nUsed Blocks: %d\nAvail Blocks: %d\nTotal Blocks: %d\n", used, avail, used+avail); _RPT0(_CRT_WARN, report); switch (heapstatus) { -- cgit v1.1