[GRASS-SVN] r60405 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 22 00:26:29 PDT 2014


Author: hamish
Date: 2014-05-22 00:26:29 -0700 (Thu, 22 May 2014)
New Revision: 60405

Modified:
   grass/branches/develbranch_6/lib/gis/raster_metadata.c
Log:
bugfix: G__raster_misc_read_line() was returning with a successful exit code but uninitialized memory if metadata file existed but was empty (e.g. when vdatum="")

Modified: grass/branches/develbranch_6/lib/gis/raster_metadata.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/raster_metadata.c	2014-05-22 07:19:31 UTC (rev 60404)
+++ grass/branches/develbranch_6/lib/gis/raster_metadata.c	2014-05-22 07:26:29 UTC (rev 60405)
@@ -113,6 +113,7 @@
     }
     if (G_getl2(buff, sizeof(buff) - 1, fd) == 0) {
 	/* file is empty */
+	strcpy(str, "");
 	return fclose(fd);
     }
 



More information about the grass-commit mailing list