summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-09-01 15:46:49 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-09-01 15:46:49 +0000
commit45925c04c86f6bb1319053a256829a8c67885210 (patch)
tree1f4df44c926f431783d7457141b03636ea10eb56
parent7e3e4b4c572efdc5da41221b8cc1c4f59971ff52 (diff)
Ooops.. mksymtab needs to check for zero-length header file names
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5076 7fd9a85b-ad96-42d3-883c-3090e2eb8679
-rw-r--r--nuttx/tools/mksymtab.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/nuttx/tools/mksymtab.c b/nuttx/tools/mksymtab.c
index 14101f3d9d..01404bc97a 100644
--- a/nuttx/tools/mksymtab.c
+++ b/nuttx/tools/mksymtab.c
@@ -94,16 +94,19 @@ static bool check_hdrfile(const char *hdrfile)
static void add_hdrfile(const char *hdrfile)
{
- if (!check_hdrfile(hdrfile))
+ if (hdrfile && strlen(hdrfile) > 0)
{
- if (nhdrfiles > MAX_HEADER_FILES)
+ if (!check_hdrfile(hdrfile))
{
- fprintf(stderr, "ERROR: Too man header files. Increase MAX_HEADER_FILES\n");
- exit(EXIT_FAILURE);
+ if (nhdrfiles > MAX_HEADER_FILES)
+ {
+ fprintf(stderr, "ERROR: Too man header files. Increase MAX_HEADER_FILES\n");
+ exit(EXIT_FAILURE);
+ }
+
+ g_hdrfiles[nhdrfiles] = strdup(hdrfile);
+ nhdrfiles++;
}
-
- g_hdrfiles[nhdrfiles] = strdup(hdrfile);
- nhdrfiles++;
}
}