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]
Date:   Sun, 9 Feb 2020 22:27:40 -0700
From:   David Ahern <dsahern@...il.com>
To:     Andrea Claudi <aclaudi@...hat.com>, netdev@...r.kernel.org
Cc:     stephen@...workplumber.org
Subject: Re: [PATCH iproute2-next] nstat: print useful error messages in
 abort() cases

On 2/6/20 11:08 AM, Andrea Claudi wrote:
> @@ -221,8 +231,11 @@ static void load_ugly_table(FILE *fp)
>  		}
>  		n = db;
>  		nread = getline(&buf, &buflen, fp);
> -		if (nread == -1)
> -			abort();
> +		if (nread == -1) {
> +			fprintf(stderr, "%s:%d: error parsing history file\n",
> +				__FILE__, __LINE__);
> +			exit(-2);
> +		}
>  		count2 = count_spaces(buf);
>  		if (count2 > count1)
>  			skip = count2 - count1;
> 

I see 2 more aborts after this one; seems like you should cover those as
well.

Also, given that it is a straightforward replace of abort with error
message + exit, this should probably go to master.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ