[GRASS-SVN] r69185 - grass/trunk/general/g.proj

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Aug 21 09:44:06 PDT 2016


Author: martinl
Date: 2016-08-21 09:44:06 -0700 (Sun, 21 Aug 2016)
New Revision: 69185

Modified:
   grass/trunk/general/g.proj/output.c
Log:
g.proj: fix segfault when pj_get_kv() return -1

Modified: grass/trunk/general/g.proj/output.c
===================================================================
--- grass/trunk/general/g.proj/output.c	2016-08-21 16:37:50 UTC (rev 69184)
+++ grass/trunk/general/g.proj/output.c	2016-08-21 16:44:06 UTC (rev 69185)
@@ -142,7 +142,8 @@
     if (check_xy(FALSE))
 	return;
 
-    pj_get_kv(&pjinfo, projinfo, projunits);
+    if (pj_get_kv(&pjinfo, projinfo, projunits) == -1)
+        G_fatal_error(_("Unable to convert projection information to PROJ.4 format"));
     proj4 = pj_get_def(pjinfo.pj, 0);
     pj_free(pjinfo.pj);
 



More information about the grass-commit mailing list