1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Description: Added format argument for an sprintf call that prints a variable string
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@users.sourceforge.net>
Bug: https://sourceforge.net/p/gplcver/issues/2
Forwarded: https://sourceforge.net/p/gplcver/issues/2/attachment/string_format_security.diff
diff --git a/src/v_ex4.c b/src/v_ex4.c
index 4375ee0..18cb857 100644
--- a/src/v_ex4.c
+++ b/src/v_ex4.c
@@ -4158,7 +4158,7 @@ extern char *__bld_showvars_prefix(char *s, struct net_t *np,
if (np->n_isavec && np->ntyp != N_INT && np->ntyp != N_TIME
&& np->ntyp != N_REAL) sprintf(s2, " %s", __to_wrange(s3, np));
else strcpy(s2, "");
- if (np->n_isarr) sprintf(s4, __to_arr_range(s3, np)); else strcpy(s4, "");
+ if (np->n_isarr) sprintf(s4, "%s", __to_arr_range(s3, np)); else strcpy(s4, "");
/* if xmr form must emit path given as arg */
if (grp == NULL) __schop(s3, np->nsym->synam); else __schop(s3, grp->gnam);
|