diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-10 18:34:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:57:10 -0500 |
commit | 5b0e40fabf133d2bb413e2e72356b33df2221a2d (patch) | |
tree | 67a90fcc0bbfabe644e36feb7b8cea93d05aabd8 /source3/registry | |
parent | 1dfe111a09ea269d84b10743ad9c2a4e335d7c88 (diff) | |
download | samba-5b0e40fabf133d2bb413e2e72356b33df2221a2d.tar.gz samba-5b0e40fabf133d2bb413e2e72356b33df2221a2d.tar.bz2 samba-5b0e40fabf133d2bb413e2e72356b33df2221a2d.zip |
r7470: fix block size caculation error when request size > 4096 bytes
(This used to be commit 21e7baa5bc2fdc23c63302c96a40660bf805a5c9)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/regfio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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")); |