summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian Electronics Team <pkg-electronics-devel@lists.alioth.debian.org>2018-11-01 23:32:47 +0100
committerRuben Undheim <rubund@debian.org>2018-11-01 23:32:47 +0100
commit384a91b3b97661873321f6896c15b4c0d02e2ef1 (patch)
tree6e13c60f1d492bd6c4ab2c3a56c2fb4562f86730
parent126aebef7a358a3180e89bc8926e22a16af1ae02 (diff)
_fix_string_format
Gbp-Pq: Name 05_fix_string_format.patch
-rw-r--r--svg.c6
-rw-r--r--tclxcircuit.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/svg.c b/svg.c
index 3b155d1..5375cea 100644
--- a/svg.c
+++ b/svg.c
@@ -1133,12 +1133,12 @@ int xctcl_svg(ClientData clientData, Tcl_Interp *interp,
if (locobjc >= 2) {
/* If there is a non-option argument, use it for the output filename */
- sprintf(filename, Tcl_GetString(objv[1]));
+ sprintf(filename, "%s", Tcl_GetString(objv[1]));
}
else if (xobjs.pagelist[areawin->page]->pageinst->thisobject->name == NULL)
- sprintf(filename, xobjs.pagelist[areawin->page]->filename);
+ sprintf(filename, "%s", xobjs.pagelist[areawin->page]->filename);
else
- sprintf(filename, xobjs.pagelist[areawin->page]->pageinst->thisobject->name);
+ sprintf(filename, "%s", xobjs.pagelist[areawin->page]->pageinst->thisobject->name);
pptr = strrchr(filename, '.');
if (pptr != NULL)
diff --git a/tclxcircuit.c b/tclxcircuit.c
index 6e49bba..62514d2 100644
--- a/tclxcircuit.c
+++ b/tclxcircuit.c
@@ -3876,7 +3876,7 @@ int xctcl_object(ClientData clientData, Tcl_Interp *interp,
case NameIdx:
if (nidx == 1 || areawin->selects == 0) {
if (objc == 3) {
- sprintf(thisinst->thisobject->name, Tcl_GetString(objv[nidx + 2]));
+ sprintf(thisinst->thisobject->name, "%s", Tcl_GetString(objv[nidx + 2]));
checkname(thisinst->thisobject);
}
Tcl_AppendElement(interp, thisinst->thisobject->name);
@@ -7356,7 +7356,7 @@ int xctcl_page(ClientData clientData, Tcl_Interp *interp,
case LoadIdx:
TechReplaceSave();
- sprintf(_STR2, Tcl_GetString(objv[2 + nidx]));
+ sprintf(_STR2, "%s", Tcl_GetString(objv[2 + nidx]));
for (i = 3 + nidx; i < objc; i++) {
argv = Tcl_GetString(objv[i]);
if ((*argv == '-') && !strncmp(argv, "-repl", 5)) {
@@ -7442,7 +7442,7 @@ int xctcl_page(ClientData clientData, Tcl_Interp *interp,
switch (importtype) {
case XCircuitIdx:
- sprintf(_STR2, Tcl_GetString(objv[3 + nidx]));
+ sprintf(_STR2, "%s", Tcl_GetString(objv[3 + nidx]));
for (i = 4; i < objc; i++) {
strcat(_STR2, ",");
strcat(_STR2, Tcl_GetString(objv[i + nidx]));
@@ -7459,7 +7459,7 @@ int xctcl_page(ClientData clientData, Tcl_Interp *interp,
Tcl_SetObjResult(interp, objPtr);
return XcTagCallback(interp, objc, objv);
}
- sprintf(_STR2, Tcl_GetString(objv[3 + nidx]));
+ sprintf(_STR2, "%s", Tcl_GetString(objv[3 + nidx]));
if (savepage != pageno) newpage(pageno);
loadbackground();
if (savepage != pageno) newpage(savepage);