[PATCH] Initialize value of written in cli_splice_fallback

Bailey Berro baileyberro at google.com
Tue Jul 3 13:43:00 UTC 2018


Thanks for taking a look. I think initializing to zero before the loop and
incrementing during each iteration makes the most sense. Please let me know
what you think.

Bailey Berro |  Software Engineer |  baileyberro at google.com |  310-433-2216


On Mon, Jul 2, 2018 at 11:55 AM David Mulder <dmulder at suse.com> wrote:

> Your insertion comes right after the while (remaining) block. We don't
> leave that block until remaining evaluates false (until it reaches 0).
> Your insertion sets written to initial_size - remaining (remaining ==
> 0). Wouldn't you simply set written to initial_size, since we don't
> leave the block until everything is written?
> Also, you used 2 spaces to indent your line. Please read README.Coding
> (you should use tabs in c files for indentation).
>
> On 06/26/2018 03:00 PM, Bailey Berro via samba-technical wrote:
> > This patch fixes an issue where cli_splice_fallback did not set the
> number
> > of bytes that are written, leading to splice returning uninitialized
> > memory.
> >
> > I just sent in my Samba Developer's Certificate of origin.
> >
> > Thanks!
> > Bailey
> >
> > Bailey Berro |  Software Engineer |  baileyberro at google.com |
> 310-433-2216
>
> --
> David Mulder
> SUSE Labs Software Engineer - Samba
> dmulder at suse.com
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB
> 21284 (AG Nürnberg)
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Initialize-written-in-cli_splice_fallback.patch
Type: text/x-patch
Size: 997 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180703/3b5947cb/0001-Initialize-written-in-cli_splice_fallback.bin>


More information about the samba-technical mailing list