1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

libcli: Use iov_buflen in smbXcli_iov_len

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2015-02-17 20:16:45 +00:00 committed by Jeremy Allison
parent cab45cb765
commit 4c000545c0
2 changed files with 6 additions and 7 deletions

View File

@ -25,6 +25,7 @@
#include "../lib/util/tevent_unix.h"
#include "lib/util/util_net.h"
#include "lib/util/dlinklist.h"
#include "lib/util/iov_buf.h"
#include "../libcli/smb/smb_common.h"
#include "../libcli/smb/smb_seal.h"
#include "../libcli/smb/smb_signing.h"
@ -1115,12 +1116,10 @@ void smb1cli_req_set_seqnum(struct tevent_req *req, uint32_t seqnum)
static size_t smbXcli_iov_len(const struct iovec *iov, int count)
{
size_t result = 0;
int i;
for (i=0; i<count; i++) {
result += iov[i].iov_len;
}
return result;
ssize_t ret = iov_buflen(iov, count);
/* Ignore the overflow case for now ... */
return ret;
}
static uint8_t *smbXcli_iov_concat(TALLOC_CTX *mem_ctx,

View File

@ -46,7 +46,7 @@ def build(bld):
LIBCRYPTO NDR_SMB2_LEASE_STRUCT errors gensec krb5samba
smb_transport
''',
public_deps='talloc samba-util',
public_deps='talloc samba-util iov_buf',
private_library=True,
public_headers='''
smb_common.h smb2_constants.h smb_constants.h