Fix cli_splice() fallback code when splicing less than a complete file.
ddiss at samba.org
Fri Jul 13 12:39:47 UTC 2018
On Fri, 13 Jul 2018 13:00:24 +0200, David Disseldorp via samba-technical wrote:
> On Thu, 12 Jul 2018 13:08:19 -0700, Jeremy Allison wrote:
> > Bailey Berro <baileyberro at google.com> found bug:
> > https://bugzilla.samba.org/show_bug.cgi?id=13527
> > where the fallback code for cli_splice() is always
> > asking for SPLICE_BLOCK_SIZE even when the
> > remaining bytes we need were smaller than that. This works
> > when using cli_splice() on a complete file, as the cli_read()
> > terminated the read at the right place.
> > Includes regression test and fix. Passes local
> > make test, and is in gitlab-CI:
> > https://gitlab.com/samba-team/devel/samba/pipelines/25667214
> > Please review and push if happy !
> Looks good, thanks for adding test coverage. Pushed to autobuild.
One thing I noticed after pushing is that there's a typo in the
regression test (which doesn't affect the result):
size_t splice_size = 13*1024*0124 + 713;
Please consider pushing the attached change.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1985 bytes
Desc: not available
More information about the samba-technical