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: <20120905175810.60ee45c8@pyramind.ukuu.org.uk>
Date:	Wed, 5 Sep 2012 17:58:10 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	"K. Y. Srinivasan" <kys@...rosoft.com>
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
	ben@...adent.org.uk, thozza@...hat.com, dcbw@...hat.com
Subject: Re: [PATCH 4/4] tools: hv: Parse /etc/os-release

> +			if (!strcmp(buf, "NAME"))
> +				os_name = strdup(value);
> +			else if (!strcmp(buf, "VERSION_ID"))
> +				os_major = strdup(value);

strdup can fail. The case where it leaks because NAME= occurs twice is
harmless enough but the strdup ought to be checked or add an x_strdup()
helper.

Alan
--
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