mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-protocol: Check arguments in ctdb_allocate_pkt
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
0eca31baf7
commit
2717427e69
@ -32,6 +32,10 @@ int ctdb_allocate_pkt(TALLOC_CTX *mem_ctx, size_t length,
|
||||
{
|
||||
size_t new_length;
|
||||
|
||||
if (buf == NULL || buflen == NULL) {
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
new_length = (length + CTDB_DS_ALIGNMENT-1) & ~(CTDB_DS_ALIGNMENT-1);
|
||||
|
||||
*buflen = new_length;
|
||||
|
Loading…
Reference in New Issue
Block a user