]> granicus.if.org Git - graphviz/commitdiff
common parseSegs: fix unchecked allocation failure
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Oct 2022 18:02:53 +0000 (11:02 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 19 Oct 2022 04:30:58 +0000 (21:30 -0700)
lib/common/emit.c

index 8fd39de19bebe8dac5a0c1b9aec09a497935c135..a298afe683a85ff403b8aeed6021f324ae30f2e0 100644 (file)
@@ -475,7 +475,7 @@ parseSegs (char* clrs, int nseg, colorsegs_t** psegs)
 {
     colorsegs_t* segs = NEW(colorsegs_t);
     colorseg_t* s;
-    char* colors = strdup (clrs);
+    char* colors = gv_strdup(clrs);
     char* color;
     int cnum = 0;
     double v, left = 1;