]> granicus.if.org Git - graphviz/commitdiff
swap an sprintf for an snprintf
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 22 Feb 2021 03:02:39 +0000 (19:02 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 28 Feb 2021 06:29:59 +0000 (22:29 -0800)
Towards #1950.

cmd/tools/unflatten.c

index 9639c1c59efde542ec2961cec8fb8755a15dc754..3ee88e9888da784ef064597f8423e317ef01e56b 100644 (file)
@@ -65,7 +65,7 @@ static void adjustlen(Agedge_t * e, Agsym_t * sym, int newlen)
 {
     char buf[12];
 
-    sprintf(buf, "%d", newlen);
+    snprintf(buf, sizeof(buf), "%d", newlen);
     agxset(e, sym, buf);
 }