summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-12-02 10:14:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:16 -0500
commit7ea35407632984b1f88d2d5b75fff1b6dc77c09b (patch)
treed02911c46e9f0a2bb8e63964d358709ec21ebb40 /source4
parent4183b2ac3832cdc2055d7eb3ed7121a9ea91085c (diff)
downloadsamba-7ea35407632984b1f88d2d5b75fff1b6dc77c09b.tar.gz
samba-7ea35407632984b1f88d2d5b75fff1b6dc77c09b.tar.bz2
samba-7ea35407632984b1f88d2d5b75fff1b6dc77c09b.zip
r4038: 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 (This used to be commit 6998c37b473d8efeb2ed5285f10f469a29ad787a)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_pack.c b/source4/lib/ldb/ldb_tdb/ldb_pack.c
index bfbc4841a6..0ebf62df8d 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_pack.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_pack.c
@@ -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 @@ static void put_uint32(char *p, int ofs, unsigned int val)
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);