[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <426367E2313C2449837CD2DE46E7EAF9309E02B3@SN2PRD0310MB382.namprd03.prod.outlook.com>
Date: Wed, 5 Sep 2012 18:16:56 +0000
From: KY Srinivasan <kys@...rosoft.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"olaf@...fle.de" <olaf@...fle.de>,
"apw@...onical.com" <apw@...onical.com>,
"ben@...adent.org.uk" <ben@...adent.org.uk>,
"thozza@...hat.com" <thozza@...hat.com>,
"dcbw@...hat.com" <dcbw@...hat.com>
Subject: RE: [PATCH 4/4] tools: hv: Parse /etc/os-release
> -----Original Message-----
> From: Alan Cox [mailto:alan@...rguk.ukuu.org.uk]
> Sent: Wednesday, September 05, 2012 12:58 PM
> To: KY Srinivasan
> 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.
I will fix this and resend this patch.
Thank you,
K. Y
--
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