]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libndr: Use _talloc_array() to benefit from overflow protection
authorVolker Lendecke <vl@samba.org>
Wed, 21 Aug 2024 12:03:22 +0000 (14:03 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 27 Aug 2024 07:19:32 +0000 (07:19 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jennifer Sutton <jsutton@samba.org>
librpc/ndr/ndr_compression.c

index 6630b5170effe2269a56fb4e6586b966a7e10716..04d810a5cb313ae533147941c48d94da61c5a7f8 100644 (file)
@@ -43,7 +43,7 @@ struct ndr_compression_state {
 
 static voidpf ndr_zlib_alloc(voidpf opaque, uInt items, uInt size)
 {
-       return talloc_zero_size(opaque, items * size);
+       return _talloc_array(opaque, size, items, __location__);
 }
 
 static void  ndr_zlib_free(voidpf opaque, voidpf address)