]> granicus.if.org Git - graphviz/commitdiff
common appendFLineList: fix unchecked allocation failure
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 13 Oct 2022 04:46:00 +0000 (21:46 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 Oct 2022 15:36:14 +0000 (08:36 -0700)
lib/common/htmlparse.y

index 998e307122390a9c7ad9b45eb143e91713c1261a..51394d20bf35737a89daa80afd3b17fcb6664610 100644 (file)
@@ -18,6 +18,7 @@
 
 %{
 
+#include <cgraph/alloc.h>
 #include <common/render.h>
 #include <common/htmltable.h>
 #include <common/htmllex.h>
@@ -207,7 +208,7 @@ appendFLineList (int v)
     else {
        ln->lp.items = NEW(textspan_t);
        ln->lp.nitems = 1;
-       ln->lp.items[0].str = strdup("");
+       ln->lp.items[0].str = gv_strdup("");
        ln->lp.items[0].font = HTMLstate.fontstack->cfont;
     }