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: <20100930202428.GB25629@sepie.suse.cz>
Date:	Thu, 30 Sep 2010 22:24:28 +0200
From:	Michal Marek <mmarek@...e.cz>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Arnaud Lacombe <lacombar@...il.com>,
	Sam Ravnborg <sam@...nborg.org>
Subject: Re: linux-next: build warning after merge of the kbuild tree

On Thu, Sep 30, 2010 at 10:52:22AM +1000, Stephen Rothwell wrote:
> After merging the kbuild tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> In file included from scripts/kconfig/zconf.tab.c:2485:
> scripts/kconfig/symbol.c: In function 'sym_expand_string_value':
> scripts/kconfig/symbol.c:881: warning: ignoring return value of 'realloc', declared with attribute warn_unused_result
> 
> Introduced by commit 76a540958af5390a94b7f68c46cb7f2aed34ccf1 ("kconfig:
> add a symbol string expansion helper").

Thanks a lot for spotting it, fixed with

From: Michal Marek <mmarek@...e.cz>
Subject: kconfig: Fix realloc usage()

Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Michal Marek <mmarek@...e.cz>
---
 scripts/kconfig/symbol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index dc5dcf2..c0efe10 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -878,7 +878,7 @@ const char *sym_expand_string_value(const char *in)
 		newlen = strlen(res) + strlen(symval) + strlen(src);
 		if (newlen > reslen) {
 			reslen = newlen;
-			realloc(res, reslen);
+			res = realloc(res, reslen);
 		}
 
 		strcat(res, symval);

Actually dealing with OOM condition would be another patch, right now
most of kconfig ignores it.

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