Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 106)
+++ /trunk/docs/Changelog	(revision 107)
@@ -1,3 +1,5 @@
 2.3.5:
+	* fix incorrect handling of files with zero size in GrowingLogFiles
+	  (problem reported by S. Petersen)
 	* fix incorrect encoding of null checksums in stealth mode
 	* sh_hash.c: fix repeated printing of acl/attributes in database dump
Index: /trunk/include/sh_tiger.h
===================================================================
--- /trunk/include/sh_tiger.h	(revision 106)
+++ /trunk/include/sh_tiger.h	(revision 107)
@@ -12,4 +12,6 @@
   TIGER_DATA
 } TigerType;
+
+#define TIGER_NOLIM ((UINT64)-1)
 
 extern SL_TICKET tiger_fd;
Index: /trunk/src/cutest_sh_tiger0.c
===================================================================
--- /trunk/src/cutest_sh_tiger0.c	(revision 106)
+++ /trunk/src/cutest_sh_tiger0.c	(revision 107)
@@ -139,5 +139,5 @@
   /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
   expected = "0E9321614C966A33608C2A15F156E0435CACFD1213B9F095";
   CuAssertStrEquals(tc, expected, actual);
@@ -147,5 +147,5 @@
   tiger_fd  = rval_open;
 
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
   expected = "0E9321614C966A33608C2A15F156E0435CACFD1213B9F095";
   CuAssertStrEquals(tc, expected, actual);
@@ -163,5 +163,5 @@
   /* same result as GNU md5sum 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
   expected = "AEEC4DDA496BCFBA691F4E8863BA84C00000000000000000";
   CuAssertStrEquals(tc, expected, actual);
@@ -179,5 +179,5 @@
   /* same result as gpg --print-md SHA1 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
   expected = "2FE65D1D995B8F8BC8B13F798C07E7E935A787ED00000000";
   CuAssertStrEquals(tc, expected, actual);
@@ -205,5 +205,5 @@
   /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
   expected = "F987845A0EA784367BF9E4DB09014995810F27C99C891734";
   CuAssertStrEquals(tc, expected, actual);
@@ -228,5 +228,5 @@
   /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
   expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8";
   CuAssertStrEquals(tc, expected, actual);
@@ -268,4 +268,8 @@
   /* same as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 
    */
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
+  expected = "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A";
+  CuAssertStrEquals(tc, expected, actual);
+
   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, testlen, 0);
   expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8";
@@ -276,5 +280,5 @@
   CuAssertStrEquals(tc, expected, actual);
 
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
   expected = "B5B4FB97B01ADB58794D87A6A01B2368852FA764BD93AB90";
   CuAssertStrEquals(tc, expected, actual);
@@ -299,5 +303,5 @@
   CuAssertStrEquals(tc, expected, actual);
 
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
   expected = "D0EE1A9956CAB22D84B51A5E0C093B724828C6A1F9CBDB7F";
   CuAssertStrEquals(tc, expected, actual);
@@ -337,5 +341,5 @@
   CuAssertTrue(tc, rval_open >= 0);
 
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
   expected = "00A1F1C5EDDCCFC430D3862FDA94593E0000000000000000";
   CuAssertStrEquals(tc, expected, actual);
@@ -371,5 +375,5 @@
   CuAssertTrue(tc, rval_open >= 0);
 
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
   expected = "FAA937EF3389C7E786EB0F1006D049D7AEA7B7B600000000";
   CuAssertStrEquals(tc, expected, actual);
Index: /trunk/src/sh_hash.c
===================================================================
--- /trunk/src/sh_hash.c	(revision 106)
+++ /trunk/src/sh_hash.c	(revision 107)
@@ -3143,5 +3143,9 @@
 #ifdef REPLACE_OLD
 	  if (sh.flag.reportonce == S_TRUE && sh.flag.update == S_FALSE)
-	    sl_strlcpy(p->theFile.checksum, fileHash, KEY_LEN+1);
+	    {
+	      sl_strlcpy(p->theFile.checksum, fileHash, KEY_LEN+1);
+	      if ((theFile->check_mask & MODI_SGROW) != 0)	      
+		p->theFile.size  = theFile->size;
+	    }
 #endif
 	}
Index: /trunk/src/sh_prelink.c
===================================================================
--- /trunk/src/sh_prelink.c	(revision 106)
+++ /trunk/src/sh_prelink.c	(revision 107)
@@ -259,5 +259,5 @@
 
   sl_strlcpy(file_hash,
-	     sh_tiger_generic_hash (path, TIGER_FD, 0, alert_timeout),
+	     sh_tiger_generic_hash (path, TIGER_FD, TIGER_NOLIM, alert_timeout),
 	     KEY_LEN+1);
 
Index: /trunk/src/sh_tiger0.c
===================================================================
--- /trunk/src/sh_tiger0.c	(revision 106)
+++ /trunk/src/sh_tiger0.c	(revision 107)
@@ -236,5 +236,5 @@
 	  }
 
-	if (Length > 0)
+	if (Length != TIGER_NOLIM)
 	  {
 	    bcount += count;
@@ -879,5 +879,5 @@
 	}
 
-      if (Length > 0)
+      if (Length != TIGER_NOLIM)
 	{
 	  bcount += n;
@@ -1402,5 +1402,5 @@
 	}
 
-      if (Length > 0)
+      if (Length != TIGER_NOLIM)
 	{
 	  bcount += n;
Index: /trunk/src/sh_unix.c
===================================================================
--- /trunk/src/sh_unix.c	(revision 106)
+++ /trunk/src/sh_unix.c	(revision 107)
@@ -2891,5 +2891,5 @@
 		 KEY_LEN+1);
       
-      /* return */
+       /* return */
       SL_RETURN( 0, _("sh_unix_checksum_size"));
     }
@@ -3226,5 +3226,5 @@
 	      sl_strlcpy(fileHash,
 			 sh_tiger_generic_hash (theFile->fullpath, 
-						TIGER_FD, 0, 
+						TIGER_FD, TIGER_NOLIM, 
 						alert_timeout),
 			 KEY_LEN+1);
@@ -3265,5 +3265,5 @@
 	      tiger_fd = rval_open;
 	      sl_strlcpy(fileHash, 
-			 sh_tiger_generic_hash (theFile->fullpath, TIGER_FD, 0,
+			 sh_tiger_generic_hash (theFile->fullpath, TIGER_FD, TIGER_NOLIM,
 						alert_timeout),
 			 KEY_LEN + 1);
