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: <4CC8A534.80504@suse.cz>
Date:	Thu, 28 Oct 2010 00:18:28 +0200
From:	Michal Marek <mmarek@...e.cz>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	Namhyung Kim <namhyung@...il.com>, linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kbuild: check return value of asprintf()

On 25.10.2010 16:42, Randy Dunlap wrote:
> On 10/25/10 02:30, Michal Marek wrote:
>> (adding Randy to CC)
> 
> Thanks, Michal.
> 
> Acked-by: Randy Dunlap <randy.dunlap@...cle.com>

OK, applied to kbuild-2.6.git#misc.

Michal
> 
> 
>> On 22.10.2010 16:32, Namhyung Kim wrote:
>>> Check return value of asprintf() in docsect() and exit if error
>>> occurs. This removes following warning:
>>>
>>>   HOSTCC  scripts/basic/docproc
>>> scripts/basic/docproc.c: In function ‘docsect’:
>>> scripts/basic/docproc.c:336: warning: ignoring return value of ‘asprintf’,
>>> 				declared with attribute warn_unused_result
>>>
>>> Signed-off-by: Namhyung Kim <namhyung@...il.com>
>>> ---
>>> The patch is on top of v2.6.36, thanks.
>>>
>>>  scripts/basic/docproc.c |    5 ++++-
>>>  1 files changed, 4 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
>>> index fc3b18d..98dec87 100644
>>> --- a/scripts/basic/docproc.c
>>> +++ b/scripts/basic/docproc.c
>>> @@ -333,7 +333,10 @@ static void docsect(char *filename, char *line)
>>>  		if (*s == '\n')
>>>  			*s = '\0';
>>>  
>>> -	asprintf(&s, "DOC: %s", line);
>>> +	if (asprintf(&s, "DOC: %s", line) < 0) {
>>> +		perror("asprintf");
>>> +		exit(1);
>>> +	}
>>>  	consume_symbol(s);
>>>  	free(s);
>>>  
>>
> 
> 

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