On Fri, Apr 21, 2023 at 6:11 PM Simon Horman wrote:
>
> Perhaps it's just me, but I'd have written this as:
>
>struct pollfd pfd = {0};
>
Got it. I will update this in the next patch version.
>
> I was wondering if we could move the assert inside sflAlloc.
> And also have sflAlloc zero t
On Sat, Apr 15, 2023 at 11:21:49PM +0800, James Raphael Tiovalen wrote:
> This commit adds zero-initializations by changing `SFL_ALLOC` from
> `malloc` to `xzalloc`, initializing a `pollfd` struct variable with
> zeroes, and changing some calls to `xmalloc` to `xzalloc`. This is to
> prevent potent
Bleep bloop. Greetings James Raphael Tiovalen, I am a robot and I have tried
out your patch.
Thanks for your contribution.
I encountered some error that I wasn't expecting. See the details below.
checkpatch:
WARNING: Line has non-spaces leading whitespace
#57 FILE: lib/sflow_agent.c:207:
This commit adds zero-initializations by changing `SFL_ALLOC` from
`malloc` to `xzalloc`, initializing a `pollfd` struct variable with
zeroes, and changing some calls to `xmalloc` to `xzalloc`. This is to
prevent potential data leaks or undefined behavior from potentially
uninitialized variables.