From 2ea8fd11ec5da77ba66b24c0c2cbee892e803904 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 30 Mar 2014 19:08:27 -0400 Subject: strife: Eliminate use of sprintf(). Use snprintf() in place of sprintf(). This is part of fixing #371. --- src/strife/st_stuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/strife/st_stuff.c') diff --git a/src/strife/st_stuff.c b/src/strife/st_stuff.c index 290edc5c..34682093 100644 --- a/src/strife/st_stuff.c +++ b/src/strife/st_stuff.c @@ -663,7 +663,8 @@ boolean ST_Responder(event_t* ev) { // [STRIFE] 'GPS' for player position static char buf[ST_MSGWIDTH]; - sprintf(buf, "ang=0x%x;x,y=(0x%x,0x%x)", + snprintf(buf, sizeof(buf), + "ang=0x%x;x,y=(0x%x,0x%x)", players[consoleplayer].mo->angle, players[consoleplayer].mo->x, players[consoleplayer].mo->y); -- cgit v1.2.3