]> granicus.if.org Git - graphviz/commitdiff
getdyn: replace sfsprintf call with snprintf
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 22 Jul 2021 03:15:35 +0000 (20:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 28 Jul 2021 03:54:42 +0000 (20:54 -0700)
Related to #1998.

lib/expr/exeval.c

index e9996ac368752d1d923f3997f43043fe2187279a..ab39e6315f62ae53d65ac4ea7edcbb40e3175f9f 100644 (file)
@@ -148,7 +148,7 @@ getdyn(Expr_t* ex, Exnode_t* expr, void* env, Exassoc_t** assoc)
                                        key = (*ex->disc->keyf) (ex, v, type, ex->disc);
                                } else
                                        key.integer = v.integer;
-                               sfsprintf(buf, sizeof(buf), "%I*x", sizeof(key.integer), key.integer);
+                               snprintf(buf, sizeof(buf), "%llx", (unsigned long long)key.integer);
                                keyname = buf;
                        } else
                                keyname = v.string;