Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=11de39e2fbbc592018e0a231d0ee773653dcc8d6
Commit:     11de39e2fbbc592018e0a231d0ee773653dcc8d6
Parent:     767e581d759fe6adfef5e676cd1cd8e11f603d1a
Author:     Marcin Garski <[EMAIL PROTECTED]>
AuthorDate: Sat May 5 22:49:00 2007 +0200
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Sun May 6 09:27:15 2007 +0200

    kconfig: fix mconf segmentation fault
    
    I have found small bug in mconf, when you run it without any argument it
    will sigsegv.
    
    Without patch:
    $ scripts/kconfig/mconf
    Segmentation fault
    
    With patch:
    $ scripts/kconfig/mconf
    can't find file (null)
    
    Signed-off-by: Marcin Garski <[EMAIL PROTECTED]>
    Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---
 scripts/kconfig/lex.zconf.c_shipped |    2 +-
 scripts/kconfig/zconf.l             |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/lex.zconf.c_shipped 
b/scripts/kconfig/lex.zconf.c_shipped
index 800f8c7..0fdc904 100644
--- a/scripts/kconfig/lex.zconf.c_shipped
+++ b/scripts/kconfig/lex.zconf.c_shipped
@@ -2264,7 +2264,7 @@ FILE *zconf_fopen(const char *name)
        FILE *f;
 
        f = fopen(name, "r");
-       if (!f && name[0] != '/') {
+       if (!f && name != NULL && name[0] != '/') {
                env = getenv(SRCTREE);
                if (env) {
                        sprintf(fullname, "%s/%s", env, name);
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index cfa4607..187d38c 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -265,7 +265,7 @@ FILE *zconf_fopen(const char *name)
        FILE *f;
 
        f = fopen(name, "r");
-       if (!f && name[0] != '/') {
+       if (!f && name != NULL && name[0] != '/') {
                env = getenv(SRCTREE);
                if (env) {
                        sprintf(fullname, "%s/%s", env, name);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to