[GRASS-SVN] r57611 - grass/branches/releasebranch_6_4/display/d.barscale
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Sep 7 04:16:28 PDT 2013
Author: hamish
Date: 2013-09-07 04:16:28 -0700 (Sat, 07 Sep 2013)
New Revision: 57611
Modified:
grass/branches/releasebranch_6_4/display/d.barscale/main.c
Log:
avoid undefined behaviour in sprintf() (#1324), remember fontsize setting (merge from devbr6 r56877,8)
Modified: grass/branches/releasebranch_6_4/display/d.barscale/main.c
===================================================================
--- grass/branches/releasebranch_6_4/display/d.barscale/main.c 2013-09-06 18:32:45 UTC (rev 57610)
+++ grass/branches/releasebranch_6_4/display/d.barscale/main.c 2013-09-07 11:16:28 UTC (rev 57611)
@@ -1,4 +1,3 @@
-
/****************************************************************************
*
* MODULE: d.barscale
@@ -174,9 +173,9 @@
else if (mouse_query(top->answer, fontsize)) {
char cmdbuf[512];
- sprintf(cmdbuf, "%s at=%.2f,%.2f", argv[0], east, north);
- sprintf(cmdbuf, "%s bcolor=%s", cmdbuf, opt1->answer);
- sprintf(cmdbuf, "%s tcolor=%s", cmdbuf, opt2->answer);
+ sprintf(cmdbuf, "%s at=%.2f,%.2f bcolor=\"%s\" tcolor=\"%s\" fontsize=%s",
+ argv[0], east, north, opt1->answer, opt2->answer, fsize->answer);
+
if (top->answer)
strcat(cmdbuf, " -t");
if (feet->answer)
More information about the grass-commit
mailing list