svn commit: samba r6429 - in trunk/source: include registry
jerry at samba.org
jerry at samba.org
Fri Apr 22 04:25:22 GMT 2005
Author: jerry
Date: 2005-04-22 04:25:21 +0000 (Fri, 22 Apr 2005)
New Revision: 6429
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6429
Log:
fix bug that caused prs_vk_rec() to fail prematurely when the reg value data was stored in the offset
Modified:
trunk/source/include/regfio.h
trunk/source/registry/regfio.c
Changeset:
Modified: trunk/source/include/regfio.h
===================================================================
--- trunk/source/include/regfio.h 2005-04-22 04:12:11 UTC (rev 6428)
+++ trunk/source/include/regfio.h 2005-04-22 04:25:21 UTC (rev 6429)
@@ -40,6 +40,7 @@
/* Flags for the vk records */
#define VK_FLAG_NAME_PRESENT 0x0001
+#define VK_DATA_IN_OFFSET 0x10000000
/* ??? List -- list of key offsets and hashed names for consistency */
Modified: trunk/source/registry/regfio.c
===================================================================
--- trunk/source/registry/regfio.c 2005-04-22 04:12:11 UTC (rev 6428)
+++ trunk/source/registry/regfio.c 2005-04-22 04:25:21 UTC (rev 6429)
@@ -400,21 +400,19 @@
if ( vk->data_size != 0 ) {
BOOL charmode = vk->type & (REG_SZ|REG_MULTI_SZ);
- if ( !(vk->data = PRS_ALLOC_MEM( ps, uint8, vk->data_size) ) )
- return False;
-
/* the data is stored in the offset if the size <= 4 */
- if ( vk->data_size > 4 ) {
- /* set the offset */
-
+ if ( vk->data_size & VK_DATA_IN_OFFSET ) {
+ if ( !(vk->data = PRS_ALLOC_MEM( ps, uint8, vk->data_size) ) )
+ return False;
if ( !(prs_set_offset( ps, vk->data_off+HBIN_HDR_SIZE )) )
return False;
-
if ( !prs_uint8s( charmode, "data", ps, depth, vk->data, vk->data_size) )
return False;
}
else {
+ if ( !(vk->data = PRS_ALLOC_MEM( ps, uint8, 4 ) ) )
+ return False;
SIVAL( vk->data, 0, vk->data_off );
}
More information about the samba-cvs
mailing list