Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11de39e2 authored by Marcin Garski's avatar Marcin Garski Committed by Sam Ravnborg
Browse files

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: default avatarMarcin Garski <mgarski@post.pl>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 767e581d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);