svn commit: samba r7470 - branches/SAMBA_3_0/source/registry
trunk/source/registry
jerry at samba.org
jerry at samba.org
Fri Jun 10 18:34:36 GMT 2005
Author: jerry
Date: 2005-06-10 18:34:36 +0000 (Fri, 10 Jun 2005)
New Revision: 7470
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7470
Log:
fix block size caculation error when request size > 4096 bytes
Modified:
branches/SAMBA_3_0/source/registry/regfio.c
trunk/source/registry/regfio.c
Changeset:
Modified: branches/SAMBA_3_0/source/registry/regfio.c
===================================================================
--- branches/SAMBA_3_0/source/registry/regfio.c 2005-06-10 16:19:38 UTC (rev 7469)
+++ branches/SAMBA_3_0/source/registry/regfio.c 2005-06-10 18:34:36 UTC (rev 7470)
@@ -1504,7 +1504,7 @@
/* allocate in multiples of REGF_ALLOC_BLOCK; make sure (size + hbin_header) fits */
- alloc_size = ((size+HBIN_HEADER_REC_SIZE) / REGF_ALLOC_BLOCK ) + REGF_ALLOC_BLOCK;
+ alloc_size = (((size+HBIN_HEADER_REC_SIZE) / REGF_ALLOC_BLOCK ) + 1 ) * REGF_ALLOC_BLOCK;
if ( !(hbin = regf_hbin_allocate( file, alloc_size )) ) {
DEBUG(0,("find_free_space: regf_hbin_allocate() failed!\n"));
Modified: trunk/source/registry/regfio.c
===================================================================
--- trunk/source/registry/regfio.c 2005-06-10 16:19:38 UTC (rev 7469)
+++ trunk/source/registry/regfio.c 2005-06-10 18:34:36 UTC (rev 7470)
@@ -1504,7 +1504,7 @@
/* allocate in multiples of REGF_ALLOC_BLOCK; make sure (size + hbin_header) fits */
- alloc_size = ((size+HBIN_HEADER_REC_SIZE) / REGF_ALLOC_BLOCK ) + REGF_ALLOC_BLOCK;
+ alloc_size = (((size+HBIN_HEADER_REC_SIZE) / REGF_ALLOC_BLOCK ) + 1 ) * REGF_ALLOC_BLOCK;
if ( !(hbin = regf_hbin_allocate( file, alloc_size )) ) {
DEBUG(0,("find_free_space: regf_hbin_allocate() failed!\n"));
More information about the samba-cvs
mailing list