[PATCH] nconfig: prevent segfault on empty menu

From: Andrej Gelenberg
Date: Sat Jul 09 2011 - 22:49:26 EST


This is a multi-part message in MIME format.Hello,

i found and fixed an NULL-dereference bug in nconf tool.

How to reproduce:
1. $ make nconfig
2. disable "Kernel hacking -> Debug Filesystem"
3. go to "General setup -> GCOV-based kernel profiling" and hit F2
it should segfault

Fix: i have added some checks for "struct menu*" to be NULL before it
get dereferenced

Regards,
Andrej Gelenberg