* [PATCH] nconfig: Fix segfault when menu is empty
@ 2010-08-02 9:59 Andrej Gelenberg
2010-08-12 22:28 ` Michal Marek
0 siblings, 1 reply; 2+ messages in thread
From: Andrej Gelenberg @ 2010-08-02 9:59 UTC (permalink / raw)
To: linux-kbuild, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
Hi,
there is a small bug in nconf, which cause segfault in empty menus
(press right arrow in empty menu). Patch is attached.
Regards,
Andrej Gelenberg
[-- Attachment #2: 0001-nconfig-Fix-segfault-when-menu-is-empty.patch --]
[-- Type: text/plain, Size: 801 bytes --]
>From 60265c2f3db2616d3dc493785a47a301f73419bd Mon Sep 17 00:00:00 2001
From: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Date: Mon, 2 Aug 2010 11:41:36 +0200
Subject: [PATCH] nconfig: Fix segfault when menu is empty
nconf crush with segfault if press right arrow in empty menu.
Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
---
scripts/kconfig/nconf.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 762caf8..3db3ca6 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -676,6 +676,7 @@ static void *item_data(void)
struct mitem *mcur;
cur = current_item(curses_menu);
+ if ( ! cur ) return NULL;
mcur = (struct mitem *) item_userptr(cur);
return mcur->usrptr;
--
1.7.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nconfig: Fix segfault when menu is empty
2010-08-02 9:59 [PATCH] nconfig: Fix segfault when menu is empty Andrej Gelenberg
@ 2010-08-12 22:28 ` Michal Marek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2010-08-12 22:28 UTC (permalink / raw)
To: Andrej Gelenberg; +Cc: linux-kbuild, linux-kernel, Nir Tzachar
On Mon, Aug 02, 2010 at 11:59:31AM +0200, Andrej Gelenberg wrote:
> there is a small bug in nconf, which cause segfault in empty menus
> (press right arrow in empty menu). Patch is attached.
>
> Regards,
> Andrej Gelenberg
> From 60265c2f3db2616d3dc493785a47a301f73419bd Mon Sep 17 00:00:00 2001
> From: Andrej Gelenberg <andrej.gelenberg@udo.edu>
> Date: Mon, 2 Aug 2010 11:41:36 +0200
> Subject: [PATCH] nconfig: Fix segfault when menu is empty
>
> nconf crush with segfault if press right arrow in empty menu.
>
> Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
> ---
> scripts/kconfig/nconf.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
> index 762caf8..3db3ca6 100644
> --- a/scripts/kconfig/nconf.c
> +++ b/scripts/kconfig/nconf.c
> @@ -676,6 +676,7 @@ static void *item_data(void)
> struct mitem *mcur;
>
> cur = current_item(curses_menu);
> + if ( ! cur ) return NULL;
> mcur = (struct mitem *) item_userptr(cur);
> return mcur->usrptr;
Applied after fixing indentation (see Documentation/CodingStyle).
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-12 22:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02 9:59 [PATCH] nconfig: Fix segfault when menu is empty Andrej Gelenberg
2010-08-12 22:28 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox