From 25555737bd6accb0ed62c42a1c784576af7e2c25 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 27 Feb 2012 10:17:06 +0000 Subject: [PATCH] A bit more safe version of sprintf Use just buffer size limit (it's used for debug only) --- daemons/clvmd/clvmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index db5dc38ba..cb38fc1d6 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -303,7 +303,7 @@ static const char *decode_cmd(unsigned char cmdl) break; } - sprintf(buf, "%s (0x%x)", command, cmdl); + snprintf(buf, sizeof(buf), "%s (0x%x)", command, cmdl); return buf; } -- 2.43.5