Skip to contentSkip to conversation

LVM2/daemons/clvmd clvmd.c

PATCH [email protected] 1 participant 1 message Feb 27, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-02-27 10:17:06

Modified files:
daemons/clvmd : clvmd.c

Log message:
A bit more safe version of sprintf

Use just buffer size limit (it's used for debug only)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.c.diff?cvsroot=lvm2&r1=1.121&r2=1.122

daemons/clvmd/clvmd.c +1 -1
@@ -303,7 +303,7 @@
 		break;
 	}
 
-	sprintf(buf, "%s (0x%x)", command, cmdl);
+	snprintf(buf, sizeof(buf), "%s (0x%x)", command, cmdl);
 
 	return buf;
 }