[GRASS-SVN] r42675 - grass/branches/releasebranch_6_4/imagery/i.smap/shapiro

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 30 03:09:38 EDT 2010


Author: neteler
Date: 2010-06-30 07:09:38 +0000 (Wed, 30 Jun 2010)
New Revision: 42675

Modified:
   grass/branches/releasebranch_6_4/imagery/i.smap/shapiro/read_sig.c
Log:
catch empty sig files

Modified: grass/branches/releasebranch_6_4/imagery/i.smap/shapiro/read_sig.c
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.smap/shapiro/read_sig.c	2010-06-29 14:59:19 UTC (rev 42674)
+++ grass/branches/releasebranch_6_4/imagery/i.smap/shapiro/read_sig.c	2010-06-30 07:09:38 UTC (rev 42675)
@@ -26,6 +26,9 @@
     if (I_ReadSigSet(fd, S) < 0 || Ref.nfiles != S->nbands)
 	G_fatal_error(_("Signature file <%s> is invalid"), parms->sigfile);
 
+    if (S->ClassSig == NULL || S->title == NULL)
+	G_fatal_error(_("Signature file <%s> is empty"), parms->sigfile);
+
     fclose(fd);
 
     return 0;



More information about the grass-commit mailing list