From af90a105ec97c6d856d2e8a80e8822c3e192d1e9 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 9 May 2015 11:19:33 -0700 Subject: Replace remaining sprintf calls with snprintf Signed-off-by: Alan Coopersmith --- setvalues.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'setvalues.c') diff --git a/setvalues.c b/setvalues.c index a28bcf9..09896d1 100644 --- a/setvalues.c +++ b/setvalues.c @@ -64,13 +64,14 @@ PrintSetValuesError(Event *event) sv_event->info[i].widgets.num_widgets); if (node == NULL) { - sprintf(buf, "Editres Internal Error: Unable to FindNode.\n"); + snprintf(buf, sizeof(buf), + "Editres Internal Error: Unable to FindNode.\n"); AddString(&errors, buf); continue; } - sprintf(buf, "%s(0x%lx) - %s\n", node->name, node->id, - sv_event->info[i].message); + snprintf(buf, sizeof(buf), "%s(0x%lx) - %s\n", node->name, node->id, + sv_event->info[i].message); AddString(&errors, buf); } return(errors); -- cgit v1.2.3