From 5b0e40fabf133d2bb413e2e72356b33df2221a2d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 10 Jun 2005 18:34:36 +0000 Subject: r7470: fix block size caculation error when request size > 4096 bytes (This used to be commit 21e7baa5bc2fdc23c63302c96a40660bf805a5c9) --- source3/registry/regfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/registry') diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c index dc69b3f9ed..d2035228ae 100644 --- a/source3/registry/regfio.c +++ b/source3/registry/regfio.c @@ -1504,7 +1504,7 @@ static REGF_HBIN* find_free_space( REGF_FILE *file, uint32 size ) /* 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")); -- cgit