You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/11/12 06:15:05 UTC
[incubator-nuttx] 02/03: tools: fix NULL pointer dereference in configure.c
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit eeeb88a1ed00eb8c5ba05383fc3dac778c81567a
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Sat Nov 12 01:25:41 2022 +0200
tools: fix NULL pointer dereference in configure.c
Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
tools/configure.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/configure.c b/tools/configure.c
index aa6d523164..ccdb096eae 100644
--- a/tools/configure.c
+++ b/tools/configure.c
@@ -800,7 +800,7 @@ static void enumerate_configs(void)
static void check_configdir(void)
{
- if (verify_optiondir(g_configpath))
+ if (g_configpath && verify_optiondir(g_configpath))
{
/* Get the path to the custom board scripts directory */
@@ -849,7 +849,7 @@ static void check_configdir(void)
snprintf(g_buffer, BUFFER_SIZE, "%s%cboards%c%s%c%s%c%s%cscripts",
g_topdir, g_delim, g_delim, g_archdir, g_delim,
g_chipdir, g_delim, g_boarddir, g_delim);
- debug("check_configdir: Checking scriptspath=%s\n", g_buffer);
+ debug("check_configdir: Checking scripts path=%s\n", g_buffer);
g_scriptspath = NULL;
if (verify_optiondir(g_buffer))