From: Matthew Fernandez Date: Sat, 15 Oct 2022 18:03:53 +0000 (-0700) Subject: common parse_layers: fix unchecked allocation failure X-Git-Tag: 7.0.0~3^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c755997ca090e4bda6ca2a1071dd61b1630ac56;p=graphviz common parse_layers: fix unchecked allocation failure --- diff --git a/lib/common/emit.c b/lib/common/emit.c index a298afe68..b638b0836 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -1147,7 +1147,7 @@ static int parse_layers(GVC_t *gvc, graph_t * g, char *p) ntok = 0; sz = 0; - gvc->layers = strdup(p); + gvc->layers = gv_strdup(p); for (tok = strtok(gvc->layers, gvc->layerDelims); tok; tok = strtok(NULL, gvc->layerDelims)) {