Fix a segfault
authorVolker Lendecke <vl@samba.org>
Fri, 28 Mar 2008 09:34:37 +0000 (10:34 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 28 Mar 2008 13:12:34 +0000 (14:12 +0100)
source/groupdb/mapping_tdb.c

index 9f2b250cca038e96a5fd9d276b540ccbcd334887..d4ee5234054c5a95d4adcc344d5085aa374fd0fe 100644 (file)
@@ -130,7 +130,7 @@ static bool add_mapping_entry(GROUP_MAP *map, int flag)
                return NULL;
        }
 
-       len = tdb_pack(NULL, sizeof(buf), "ddff",
+       len = tdb_pack(NULL, 0, "ddff",
                map->gid, map->sid_name_use, map->nt_name, map->comment);
 
        buf = TALLOC_ARRAY(key, char, len);