mirror of
https://github.com/samba-team/samba.git
synced 2025-02-07 01:58:28 +03:00
libsmbclient: Initialize written in cli_splice_fallback()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13511 Signed-off-by: Bailey Berro <baileyberro@chromium.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Jul 9 21:29:48 CEST 2018 on sn-devel-144 (cherry picked from commit fe25bc793d30a64f06b19f737c652b0c7389ca92)
This commit is contained in:
parent
40c978434c
commit
6930bb96f5
@ -1459,6 +1459,7 @@ static NTSTATUS cli_splice_fallback(TALLOC_CTX *frame,
|
||||
uint8_t *buf = talloc_size(frame, SPLICE_BLOCK_SIZE);
|
||||
size_t nread;
|
||||
off_t remaining = initial_size;
|
||||
*written = 0;
|
||||
|
||||
while (remaining) {
|
||||
status = cli_read(srccli, src_fnum,
|
||||
@ -1480,6 +1481,7 @@ static NTSTATUS cli_splice_fallback(TALLOC_CTX *frame,
|
||||
}
|
||||
src_offset += nread;
|
||||
dst_offset += nread;
|
||||
*written += nread;
|
||||
if (remaining < nread) {
|
||||
return NT_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user