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

index b638b083690b4a82f4e6057f56035d75473cf19f..cfee1b4000d0d003df81ae92d73fdb2e39e5d7c7 100644 (file)
@@ -2381,7 +2381,7 @@ static void emit_edge_graphics(GVJ_t * job, edge_t * e, char** styles)
                tmplist[j].y = pf3.y - numc2 * offlist[j].y;
            }
            lastcolor = headcolor = tailcolor = color;
-           colors = strdup(color);
+           colors = gv_strdup(color);
            for (cnum = 0, color = strtok(colors, ":"); color;
                cnum++, color = strtok(0, ":")) {
                if (!color[0])