[GRASS-SVN] r42676 -
grass/branches/develbranch_6/imagery/i.smap/shapiro
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 30 03:10:10 EDT 2010
Author: neteler
Date: 2010-06-30 07:10:10 +0000 (Wed, 30 Jun 2010)
New Revision: 42676
Modified:
grass/branches/develbranch_6/imagery/i.smap/shapiro/read_sig.c
Log:
catch empty sig files
Modified: grass/branches/develbranch_6/imagery/i.smap/shapiro/read_sig.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.smap/shapiro/read_sig.c 2010-06-30 07:09:38 UTC (rev 42675)
+++ grass/branches/develbranch_6/imagery/i.smap/shapiro/read_sig.c 2010-06-30 07:10:10 UTC (rev 42676)
@@ -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