svn commit: samba r4038 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .

metze at samba.org metze at samba.org
Thu Dec 2 10:14:40 GMT 2004


Author: metze
Date: 2004-12-02 10:14:40 +0000 (Thu, 02 Dec 2004)
New Revision: 4038

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4038

Log:
fix sign/unsign bug I introduced in -r 4022

this caused new ldb record to be corrupt if the length was > 12b byte

thanks tridge for finding this

metze

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_pack.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_pack.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_pack.c	2004-12-02 04:51:56 UTC (rev 4037)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_pack.c	2004-12-02 10:14:40 UTC (rev 4038)
@@ -44,7 +44,7 @@
 #define LTDB_PACKING_FORMAT_NODN 0x26011966
 
 /* use a portable integer format */
-static void put_uint32(char *p, int ofs, unsigned int val)
+static void put_uint32(uint32 *p, int ofs, unsigned int val)
 {
 	p += ofs;
 	p[0] = val&0xFF;
@@ -53,7 +53,7 @@
 	p[3] = (val>>24) & 0xFF;
 }
 
-static unsigned int pull_uint32(char *p, int ofs)
+static unsigned int pull_uint32(uint32 *p, int ofs)
 {
 	p += ofs;
 	return p[0] | (p[1]<<8) | (p[2]<<16) | (p[3]<<24);



More information about the samba-cvs mailing list