[PATCH] Initialize value of written in cli_splice_fallback

David Mulder dmulder at suse.com
Tue Jul 3 13:57:23 UTC 2018


I agree this approach looks better.
rb+

On 07/03/2018 07:43 AM, Bailey Berro wrote:
> 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
> <mailto:baileyberro at google.com> | 	 310-433-2216
>
>
>
>
> On Mon, Jul 2, 2018 at 11:55 AM David Mulder <dmulder at suse.com
> <mailto: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
>     <mailto:baileyberro at google.com> |  310-433-2216
>
>     -- 
>     David Mulder
>     SUSE Labs Software Engineer - Samba
>     dmulder at suse.com <mailto:dmulder at suse.com>
>     SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham
>     Norton, HRB 21284 (AG Nürnberg)
>

-- 
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)



More information about the samba-technical mailing list