Index: trunk/src/cutest_sh_tiger0.c
===================================================================
--- trunk/src/cutest_sh_tiger0.c	(revision 150)
+++ trunk/src/cutest_sh_tiger0.c	(revision 151)
@@ -135,4 +135,5 @@
   char * expected;
   char hashbuf[KEYBUF_SIZE];
+  UINT64  length;
 
   init();
@@ -153,5 +154,6 @@
   /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "0E9321614C966A33608C2A15F156E0435CACFD1213B9F095";
   CuAssertStrEquals(tc, expected, actual);
@@ -160,5 +162,6 @@
   CuAssertTrue(tc, rval_open >= 0);
 
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "0E9321614C966A33608C2A15F156E0435CACFD1213B9F095";
   CuAssertStrEquals(tc, expected, actual);
@@ -175,5 +178,6 @@
   /* same result as GNU md5sum 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "AEEC4DDA496BCFBA691F4E8863BA84C00000000000000000";
   CuAssertStrEquals(tc, expected, actual);
@@ -190,5 +194,6 @@
   /* same result as gpg --print-md SHA1 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "2FE65D1D995B8F8BC8B13F798C07E7E935A787ED00000000";
   CuAssertStrEquals(tc, expected, actual);
@@ -216,5 +221,6 @@
   /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "F987845A0EA784367BF9E4DB09014995810F27C99C891734";
   CuAssertStrEquals(tc, expected, actual);
@@ -239,5 +245,6 @@
   /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8";
   CuAssertStrEquals(tc, expected, actual);
@@ -258,7 +265,8 @@
   char * expected;
   char hashbuf[KEYBUF_SIZE];
+  UINT64  length;
 
   char * teststring = "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham, proceedings of Fast Software Encryption 3, Cambridge, 1996.\n";
-  int    testlen = strlen(teststring);
+  size_t    testlen = strlen(teststring);
 
   init();
@@ -280,19 +288,27 @@
   /* same as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 
    */
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0, hashbuf, sizeof(hashbuf));
+  length = 0;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A";
   CuAssertStrEquals(tc, expected, actual);
-
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, testlen, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 0 == length);
+
+  length = testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8";
   CuAssertStrEquals(tc, expected, actual);
-
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 2*testlen, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, testlen == length);
+
+  length = 2*testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "B5B4FB97B01ADB58794D87A6A01B2368852FA764BD93AB90";
   CuAssertStrEquals(tc, expected, actual);
-
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 2*testlen == length);
+
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "B5B4FB97B01ADB58794D87A6A01B2368852FA764BD93AB90";
   CuAssertStrEquals(tc, expected, actual);
+  CuAssertTrue(tc, 2*testlen == length);
 
   fp = fopen("cutest_foo", "a");
@@ -303,23 +319,33 @@
   CuAssertTrue(tc, result == 0);
 
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, testlen, 0, hashbuf, sizeof(hashbuf));
+  length = testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8";
   CuAssertStrEquals(tc, expected, actual);
-
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 2*testlen, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, testlen == length);
+
+  length = 2*testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "B5B4FB97B01ADB58794D87A6A01B2368852FA764BD93AB90";
   CuAssertStrEquals(tc, expected, actual);
-
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 3*testlen, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 2*testlen == length);
+
+  length = 3*testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "D0EE1A9956CAB22D84B51A5E0C093B724828C6A1F9CBDB7F";
   CuAssertStrEquals(tc, expected, actual);
-
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 3*testlen == length);
+
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "D0EE1A9956CAB22D84B51A5E0C093B724828C6A1F9CBDB7F";
   CuAssertStrEquals(tc, expected, actual);
-
-  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 5, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 3*testlen == length);
+
+  length = 5;
+  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "9F00F599072300DD276ABB38C8EB6DEC37790C116F9D2BDF";
   CuAssertStrEquals(tc, expected, actual);
+  CuAssertTrue(tc, 5 == length);
 
   /* same results as GNU md5sum */
@@ -331,28 +357,36 @@
   CuAssertTrue(tc, rval_open >= 0);
 
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, testlen, 0, hashbuf, sizeof(hashbuf));
+  length = testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "11E7E7EA486136273606BEE57C71F34B0000000000000000";
   CuAssertStrEquals(tc, expected, actual);
-
-  result = sl_rewind(rval_open);
-  CuAssertTrue(tc, rval_open >= 0);
-
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, 2*testlen, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, testlen == length);
+
+  result = sl_rewind(rval_open);
+  CuAssertTrue(tc, rval_open >= 0);
+
+  length = 2*testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "D49DAD474095D467E2E5EFCB2DC23A770000000000000000";
   CuAssertStrEquals(tc, expected, actual);
-
-  result = sl_rewind(rval_open);
-  CuAssertTrue(tc, rval_open >= 0);
-
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, 3*testlen, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 2*testlen == length);
+
+  result = sl_rewind(rval_open);
+  CuAssertTrue(tc, rval_open >= 0);
+
+  length = 3*testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "00A1F1C5EDDCCFC430D3862FDA94593E0000000000000000";
   CuAssertStrEquals(tc, expected, actual);
-
-  result = sl_rewind(rval_open);
-  CuAssertTrue(tc, rval_open >= 0);
-
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 3*testlen == length);
+
+  result = sl_rewind(rval_open);
+  CuAssertTrue(tc, rval_open >= 0);
+
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "00A1F1C5EDDCCFC430D3862FDA94593E0000000000000000";
   CuAssertStrEquals(tc, expected, actual);
+  CuAssertTrue(tc, 3*testlen == length);
 
   /* same result as gpg --print-md SHA1 
@@ -365,28 +399,36 @@
   CuAssertTrue(tc, rval_open >= 0);
 
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, testlen, 0, hashbuf, sizeof(hashbuf));
+  length = testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "F37DB4344CCD140EE315179E9A27512FB4704F0F00000000";
   CuAssertStrEquals(tc, expected, actual);
-
-  result = sl_rewind(rval_open);
-  CuAssertTrue(tc, rval_open >= 0);
-
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, 2*testlen, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, testlen == length);
+
+  result = sl_rewind(rval_open);
+  CuAssertTrue(tc, rval_open >= 0);
+
+  length = 2*testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "D2AD5FC366452D81400BAC31F96269DEEF314BC200000000";
   CuAssertStrEquals(tc, expected, actual);
-
-  result = sl_rewind(rval_open);
-  CuAssertTrue(tc, rval_open >= 0);
-
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, 3*testlen, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 2*testlen == length);
+
+  result = sl_rewind(rval_open);
+  CuAssertTrue(tc, rval_open >= 0);
+
+  length = 3*testlen;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "FAA937EF3389C7E786EB0F1006D049D7AEA7B7B600000000";
   CuAssertStrEquals(tc, expected, actual);
-
-  result = sl_rewind(rval_open);
-  CuAssertTrue(tc, rval_open >= 0);
-
-  actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf));
+  CuAssertTrue(tc, 3*testlen == length);
+
+  result = sl_rewind(rval_open);
+  CuAssertTrue(tc, rval_open >= 0);
+
+  length = TIGER_NOLIM;
+  actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf));
   expected = "FAA937EF3389C7E786EB0F1006D049D7AEA7B7B600000000";
   CuAssertStrEquals(tc, expected, actual);
+  CuAssertTrue(tc, 3*testlen == length);
 
   result = sl_close(rval_open);
Index: trunk/src/sh_prelink.c
===================================================================
--- trunk/src/sh_prelink.c	(revision 150)
+++ trunk/src/sh_prelink.c	(revision 151)
@@ -261,6 +261,7 @@
   {
     char hashbuf[KEYBUF_SIZE];
+    UINT64 length_nolim = TIGER_NOLIM;
     sl_strlcpy(file_hash,
-	       sh_tiger_generic_hash (path, task.pipeTI, TIGER_NOLIM, alert_timeout,
+	       sh_tiger_generic_hash (path, task.pipeTI, &length_nolim, alert_timeout,
 				      hashbuf, sizeof(hashbuf)),
 	       KEY_LEN+1);
Index: trunk/src/sh_tiger0.c
===================================================================
--- trunk/src/sh_tiger0.c	(revision 150)
+++ trunk/src/sh_tiger0.c	(revision 151)
@@ -106,9 +106,9 @@
 static
 word64 * sh_tiger_hash_val (const char * filename, TigerType what, 
-			    UINT64 Length, int timeout, word64 * res)
+			    UINT64 * Length, int timeout, word64 * res)
 #else
 static
 sh_word32 * sh_tiger_hash_val (const char * filename, TigerType what, 
-			       UINT64 Length, int timeout, sh_word32 * res)
+			       UINT64 * Length, int timeout, sh_word32 * res)
 #endif
 {
@@ -178,4 +178,5 @@
 	  SH_FREE(tmp);
 	  SH_FREE(buffer);
+	  *Length = 0;
 	  SL_RETURN( NULL, _("sh_tiger_hash_val"));
 	}
@@ -222,4 +223,5 @@
 	      sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte));
 	      SH_FREE(buffer);
+	      *Length = 0;
 	      SL_RETURN( NULL, _("sh_tiger_hash_val"));
 	    }
@@ -242,13 +244,18 @@
 	    sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte));
 	    SH_FREE(buffer);
+	    *Length = 0;
 	    SL_RETURN( NULL, _("sh_tiger_hash_val"));
 	  }
 
-	if (Length != TIGER_NOLIM)
+	bcount += count;
+
+	if (*Length != TIGER_NOLIM)
 	  {
-	    bcount += count;
-	    if (bcount > Length) 
-	      count = count - (bcount - Length);
-	    count = (count < 0) ? 0 : count;
+	    if (bcount > *Length)
+	      {
+		count   = count - (bcount - (*Length));
+		bcount  = *Length;
+		count = (count < 0) ? 0 : count;
+	      }
 	  }
 
@@ -288,4 +295,5 @@
 	    sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte));
 	    SH_FREE(buffer);
+	    *Length = 0;
 	    SL_RETURN( NULL, _("sh_tiger_hash_val"));
 	  }
@@ -375,4 +383,5 @@
     sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte));
     SH_FREE(buffer);
+    *Length = bcount;
     SL_RETURN( res, _("sh_tiger_hash_val"));
   }
@@ -380,5 +389,5 @@
   if (what == TIGER_DATA && filename != NULL) 
     {
-      tiger(TIGER_CAST filename, (sh_word32) Length, res);
+      tiger(TIGER_CAST filename, (sh_word32) *Length, res);
       sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte));
       SH_FREE(buffer);
@@ -387,4 +396,5 @@
   sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte));
   SH_FREE(buffer);
+  *Length = 0;
   SL_RETURN( NULL, _("sh_tiger_hash_val"));
 }
@@ -822,5 +832,5 @@
    beginning at RESBLOCK.  */
 static int md5_stream(char * filename, void *resblock, 
-		      UINT64 Length, int timeout, SL_TICKET fd)
+		      UINT64 * Length, int timeout, SL_TICKET fd)
 {
   /* Important: BLOCKSIZE must be a multiple of 64.  */
@@ -852,4 +862,5 @@
 		       MSG_E_ACCESS, (long) euid, tmp);
       SH_FREE(tmp);
+      *Length = 0;
       return -1;
     }
@@ -888,13 +899,18 @@
 			     MSG_E_READ, tmp);
 	  SH_FREE(tmp);
+	  *Length = 0;
 	  return -1;
 	}
 
-      if (Length != TIGER_NOLIM)
+      bcount += n;
+
+      if (*Length != TIGER_NOLIM)
 	{
-	  bcount += n;
-	  if (bcount > Length) 
-	    n = n - (bcount - Length);
-	  n = (n < 0) ? 0 : n;
+	  if (bcount > *Length) 
+	    {
+	      n = n - (bcount - (*Length));
+	      bcount = *Length;
+	      n = (n < 0) ? 0 : n;
+	    }
 	}
 
@@ -924,4 +940,5 @@
     if (sig_termfast == 1) 
       {
+	*Length = 0;
 	return -1;
       }
@@ -939,4 +956,5 @@
   (void) md5Digest(&ctx, resblock);
 
+  *Length = bcount;
   return 0;
 }
@@ -944,5 +962,5 @@
 static
 char * sh_tiger_md5_hash  (char * filename, TigerType what, 
-			   UINT64 Length, int timeout, char * out, size_t len)
+			   UINT64 * Length, int timeout, char * out, size_t len)
 {
   int cnt;
@@ -1332,5 +1350,5 @@
    beginning at RESBLOCK.  */
 static int sha1_stream(char * filename, void *resblock, 
-		       UINT64 Length, int timeout, SL_TICKET fd)
+		       UINT64 * Length, int timeout, SL_TICKET fd)
 {
   /* Important: BLOCKSIZE must be a multiple of 64.  */
@@ -1361,4 +1379,5 @@
 		       MSG_E_ACCESS, (long) euid, tmp);
       SH_FREE(tmp);
+      *Length = 0;
       return -1;
     }
@@ -1400,13 +1419,18 @@
 	    }
 	  SH_FREE(tmp);
+	  *Length = 0;
 	  return -1;
 	}
 
-      if (Length != TIGER_NOLIM)
+      bcount += n;
+
+      if (*Length != TIGER_NOLIM)
 	{
-	  bcount += n;
-	  if (bcount > Length) 
-	    n = n - (bcount - Length);
-	  n = (n < 0) ? 0 : n;
+	  if (bcount > *Length)
+	    {
+	      n = n - (bcount - (*Length));
+	      bcount = *Length;
+	      n = (n < 0) ? 0 : n;
+	    }
 	}
 
@@ -1436,4 +1460,5 @@
     if (sig_termfast == 1) 
       {
+	*Length = 0;
 	return -1;
       }
@@ -1453,4 +1478,5 @@
   /* Construct result in desired memory.  */
   sha_digest (&ctx, resblock);
+  *Length = bcount;
   return 0;
 }
@@ -1458,5 +1484,5 @@
 
 static char * sh_tiger_sha1_hash  (char * filename, TigerType what, 
-				   UINT64 Length, int timeout, 
+				   UINT64 * Length, int timeout, 
 				   char * out, size_t len)
 {
@@ -1517,5 +1543,5 @@
 
 static char * sh_tiger_hash_internal (const char * filename, TigerType what, 
-				      UINT64 Length, int timeout,
+				      UINT64 * Length, int timeout,
 				      char * out, size_t len);
 
@@ -1523,9 +1549,11 @@
 		      UINT64 Length, char * out, size_t len)
 {
-  return sh_tiger_hash_internal (filename, what, Length, 0, out,len);
+  UINT64 local_length = Length;
+  char * retval = sh_tiger_hash_internal (filename, what, &local_length, 0, out,len);
+  return retval;
 }
 
 char * sh_tiger_generic_hash (char * filename, TigerType what, 
-			      UINT64 Length, int timeout,
+			      UINT64 * Length, int timeout,
 			      char * out, size_t len)
 {
@@ -1545,5 +1573,5 @@
   
 static char * sh_tiger_hash_internal (const char * filename, TigerType what, 
-				      UINT64 Length, int timeout, 
+				      UINT64 * Length, int timeout, 
 				      char * out, size_t len)
 {
@@ -1598,8 +1626,9 @@
   sh_word32 res[6];
 #endif
+  UINT64 local_length = Length;
 
   SL_ENTER(_("sh_tiger_hash_gpg"));
 
-  if (NULL != sh_tiger_hash_val (filename, what, Length, 0, res))
+  if (NULL != sh_tiger_hash_val (filename, what, &local_length, 0, res))
     {
 #if defined(TIGER_64_BIT)
@@ -1663,4 +1692,5 @@
   sh_word32 res[6];
 #endif
+  UINT64 local_length = Length;
 
   SL_ENTER(_("sh_tiger_hash_uint32"));
@@ -1671,5 +1701,5 @@
   out[3] = 0; out[4] = 0; out[5] = 0;
 
-  if (NULL != sh_tiger_hash_val (filename,  what,  Length, 0, res))
+  if (NULL != sh_tiger_hash_val (filename,  what,  &local_length, 0, res))
     {
 #if defined(TIGER_64_BIT)
Index: trunk/src/sh_unix.c
===================================================================
--- trunk/src/sh_unix.c	(revision 150)
+++ trunk/src/sh_unix.c	(revision 151)
@@ -3033,5 +3033,5 @@
       char hashbuf[KEYBUF_SIZE];
       sl_strlcpy(fileHash,
-		 sh_tiger_generic_hash (filename, fd, tmpFile.size, 
+		 sh_tiger_generic_hash (filename, fd, &(tmpFile.size), 
 					alert_timeout, hashbuf, sizeof(hashbuf)),
 		 KEY_LEN+1);
@@ -3371,7 +3371,8 @@
 	    {
 	      char hashbuf[KEYBUF_SIZE];
+	      UINT64 length_nolim = TIGER_NOLIM;
 	      sl_strlcpy(fileHash,
 			 sh_tiger_generic_hash (theFile->fullpath, 
-						rval_open, TIGER_NOLIM, 
+						rval_open, &length_nolim, 
 						alert_timeout, 
 						hashbuf, sizeof(hashbuf)),
@@ -3379,4 +3380,6 @@
 	      if ((theFile->check_mask & MODI_SGROW) != 0)
 		{
+		  fbuf.st_size = (off_t) length_nolim;
+		  buf.st_size  = fbuf.st_size;
 		  sl_rewind(rval_open);
 		  sh_unix_checksum_size (theFile->fullpath, &fbuf, 
@@ -3411,7 +3414,8 @@
 	    {
 	      char hashbuf[KEYBUF_SIZE];
+	      UINT64 length_nolim = TIGER_NOLIM;
 	      sl_strlcpy(fileHash, 
 			 sh_tiger_generic_hash (theFile->fullpath, rval_open, 
-						TIGER_NOLIM,
+						&length_nolim,
 						alert_timeout,
 						hashbuf, sizeof(hashbuf)),
@@ -3419,4 +3423,6 @@
 	      if ((theFile->check_mask & MODI_SGROW) != 0) 
 		{
+		  fbuf.st_size = (off_t) length_nolim;
+		  buf.st_size  = fbuf.st_size;
 		  sl_rewind(rval_open);
 		  sh_unix_checksum_size (theFile->fullpath, &fbuf, 
