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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358066617.1594.10.camel@leonhard>
Date:	Sun, 13 Jan 2013 17:43:37 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung.kim@....com>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 07/10] perf sort: Check return value of strdup()

Hi Arnaldo,

2013-01-11 (금), 02:17 -0300, Arnaldo Carvalho de Melo:
> Em Thu, Dec 27, 2012 at 06:11:44PM +0900, Namhyung Kim escreveu:
> > From: Namhyung Kim <namhyung.kim@....com>
> > 
> > When setup_sorting() is called, 'str' is passed to strtok_r() but it's
> > not checked to have a valid pointer.  As strtok_r() accepts NULL
> > pointer on a first argument and use the third argument in that case,
> > it can cause a trouble since our third argument, tmp, is not
> > initialized.
> 
> Ok, but calling exit from here? Better to check it at the callers and
> propagate the error, letting things like TUI/gui exit routines to
> execute.

That's fine to me too, but currently setup_sorting() exits through
usage_with_options() if sort_dimension__add() fails and I followed the
convention here.  Making it to return will require changes to every
callsites of the function.

If you think it's better to change, I can do it as well.

Thanks,
Namhyung


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ