From d33e6e2eb514aa0ced9da07daecea0b705c87bbb Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 13 Oct 2022 21:01:28 -0700 Subject: [PATCH] common initAnchor: fix unchecked allocation failure --- lib/common/htmltable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 960801f73..47e2a9133 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -391,7 +392,7 @@ initAnchor(GVJ_t * job, htmlenv_t * env, htmldata_t * data, boxf b, if (!id || !*id) { /* no external id, so use the internal one */ agxbinit(&xb, SMALLBUF, buf); if (!env->objid) { - env->objid = strdup(getObjId(job, obj->u.n, &xb)); + env->objid = gv_strdup(getObjId(job, obj->u.n, &xb)); env->objid_set = true; } agxbprint(&xb, "%s_%d", env->objid, anchorId++); -- 2.40.0