[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <adc5b6e4-28c1-7fe2-b7b1-c6b1cd39f8ed@infradead.org>
Date: Tue, 14 Aug 2018 13:50:19 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: linux-kbuild <linux-kbuild@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Cc: Yuexing Wang <wangyxlandq@...il.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>
Subject: [PATCH] modpost: check strdup() return value
From: Randy Dunlap <rdunlap@...radead.org>
Fix missing error check for function strdup() in scripts/mod/modpost.c.
Fixes kernel bugzilla #200319:
https://bugzilla.kernel.org/show_bug.cgi?id=200319
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Yuexing Wang <wangyxlandq@...il.com>
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
---
scripts/mod/modpost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20180814.orig/scripts/mod/modpost.c
+++ linux-next-20180814/scripts/mod/modpost.c
@@ -672,7 +672,7 @@ static void handle_modversions(struct mo
if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
break;
if (symname[0] == '.') {
- char *munged = strdup(symname);
+ char *munged = NOFAIL(strdup(symname));
munged[0] = '_';
munged[1] = toupper(munged[1]);
symname = munged;
Powered by blists - more mailing lists