From 2080b3e1b18126628890c61a62eca28dcd65818e Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 11 Mar 2015 14:25:05 -0700 Subject: Merge to XFA: Kill remaining sprintfs There is fx_codec_png.cpp that has a sprintf under XFA that was not present in master. Original Review URL: https://codereview.chromium.org/999543002 R=thestig@chromium.org Review URL: https://codereview.chromium.org/995993002 --- xfa/src/fxgraphics/src/pre.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xfa/src') diff --git a/xfa/src/fxgraphics/src/pre.h b/xfa/src/fxgraphics/src/pre.h index dc82b35a74..ab0df3d9ac 100644 --- a/xfa/src/fxgraphics/src/pre.h +++ b/xfa/src/fxgraphics/src/pre.h @@ -100,7 +100,8 @@ static const FX_HATCHDATA hatchBitmapData[FX_HATCHSTYLE_Total] = { WORD wSecond = stop.wSecond - start.wSecond; \ WORD wMilliseconds = stop.wMilliseconds - start.wMilliseconds; \ char buf[256]; \ - sprintf(buf, "duration is %d millisecond\n", wSecond * 1000 + wMilliseconds); \ + memset(buf, 0, sizeof(buf)); \ + snprintf(buf, sizeof(buf) - 1, "duration is %d millisecond\n", wSecond * 1000 + wMilliseconds); \ ::OutputDebugString(buf); #elif defined (__linux) || defined (linux) #define FX_START_TIMER -- cgit v1.2.3