On 6/26/24 13:33, Shuah Khan wrote:
On 6/26/24 01:20, Ma Ke wrote:
The open() function returns -1 on error. openat() and open() initialize
'from' and 'to', and only 'from' validated with 'if' statement. If the
initialization of variable 'to' fails, we should better check the value
of 'to' and cl
On 6/26/24 01:20, Ma Ke wrote:
The open() function returns -1 on error. openat() and open() initialize
'from' and 'to', and only 'from' validated with 'if' statement. If the
initialization of variable 'to' fails, we should better check the value
of 'to' and close 'from' to avoid possible file lea
>… openat() and open() initialize
> 'from' and 'to', and only 'from' validated with 'if' statement.
Why do find such information helpful?
> If the
> initialization of variable 'to' fails,
The
The open() function returns -1 on error. openat() and open() initialize
'from' and 'to', and only 'from' validated with 'if' statement. If the
initialization of variable 'to' fails, we should better check the value
of 'to' and close 'from' to avoid possible file leak.
Fixes: 32ae976ed3b5 ("selftes