Browse Source

allocate enough room for the null terminator, plus a little more (https://trac.osgeo.org/grass/ticket/1312)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50182 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 13 years ago
parent
commit
9196b21abd
2 changed files with 2 additions and 2 deletions
  1. 1 1
      raster/r.terraflow/nodata.h
  2. 1 1
      raster/r.terraflow/plateau.h

+ 1 - 1
raster/r.terraflow/nodata.h

@@ -61,7 +61,7 @@ public:
   }
 
   static char *printLabel(const nodataType &p) {
-	static char buf[3];
+	static char buf[8];
 	sprintf(buf, CCLABEL_FMT, p.label);
 	return buf;
   }

+ 1 - 1
raster/r.terraflow/plateau.h

@@ -46,7 +46,7 @@ public:
   void invalidate() { valid = false; }
   
   static char *printLabel(const plateauType &p) {
-    static char buf[3];
+    static char buf[8];
     sprintf(buf, CCLABEL_FMT, p.cclabel);
     return buf;
   }