lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45473342-cba7-c489-2cd4-738eb7424dc8@gmail.com>
Date:   Mon, 11 Jan 2021 17:20:56 -0700
From:   David Ahern <dsahern@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>, David Ahern <dsahern@...nel.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, schoen@...alty.org
Subject: Re: [PATCH net-next v2 06/11] selftests: Use separate stdout and
 stderr buffers in nettest

On 1/11/21 5:15 PM, Jakub Kicinski wrote:
>> diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftests/net/nettest.c
>> index 0e4196027d63..13c74774e357 100644
>> --- a/tools/testing/selftests/net/nettest.c
>> +++ b/tools/testing/selftests/net/nettest.c
>> @@ -1705,9 +1705,27 @@ static char *random_msg(int len)
>>  
>>  static int ipc_child(int fd, struct sock_args *args)
>>  {
>> +	char *outbuf, *errbuf;
>> +	int rc;
>> +
>> +	outbuf = malloc(4096);
>> +	errbuf = malloc(4096);
>> +	if (!outbuf || !errbuf) {
>> +		fprintf(stderr, "server: Failed to allocate buffers for stdout and stderr\n");
>> +		return 1;
> 
> that's a memleak, rc = 1, goto free; ?
> 
> Also there's a few uses of fprintf(stderr, .. instead of log_error()
> is there a reason for it?
> 
> I don't think this is a big deal, I'll apply unless you object in time.
> 

good catch. I found a bug in patch 5 as well. I'll fix and re-send.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ