mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
Don't take the sizeof(struct in_addr) * -1
(This used to be commit e13016bb42dbba675d6e7ee7e163543aad2e62c2)
This commit is contained in:
parent
d58445d6cc
commit
53fabdee01
@ -93,8 +93,10 @@ static TDB_DATA namecache_value(struct in_addr *ip_list, int num_names,
|
||||
struct nc_value *value;
|
||||
int size;
|
||||
|
||||
size = sizeof(struct nc_value) + sizeof(struct in_addr) *
|
||||
(num_names-1);
|
||||
size = sizeof(struct nc_value);
|
||||
|
||||
if (num_names > 0)
|
||||
size += sizeof(struct in_addr) * (num_names-1);
|
||||
|
||||
value = (struct nc_value *)malloc(size);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user