INN commit: branches/2.4/storage/buffindexed (buffindexed.c)

INN Commit Russ_Allbery at isc.org
Sat Feb 10 22:19:49 UTC 2007


    Date: Saturday, February 10, 2007 @ 14:19:49
  Author: eagle
Revision: 7602

When calculating the length of a buffer, cast the calculation to off_t
since it may be longer than unsigned long.  Thanks, Kirill Berezin.

Modified:
  branches/2.4/storage/buffindexed/buffindexed.c

---------------+
 buffindexed.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Modified: buffindexed.c
===================================================================
--- buffindexed.c	2007-02-10 22:18:52 UTC (rev 7601)
+++ buffindexed.c	2007-02-10 22:19:49 UTC (rev 7602)
@@ -312,8 +312,8 @@
   }
   l = ++p;
 
-  /* Length/size of symbolic partition */
-  len = strtoul(l, NULL, 10) * 1024;     /* This value in KB in decimal */
+  /* Length/size of symbolic partition in KB */
+  len = strtoul(l, NULL, 10) * (off_t) 1024;
   /*
   ** The minimum article offset will be the size of the bitfield itself,
   ** len / (blocksize * 8), plus however many additional blocks the OVBUFFHEAD



More information about the inn-committers mailing list