summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dircolors.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dircolors.c b/src/dircolors.c
index 96ede3714..0fb236faf 100644
--- a/src/dircolors.c
+++ b/src/dircolors.c
@@ -292,6 +292,15 @@ dc_parse_stream (FILE *fp, const char *filename)
if (keywd == NULL)
continue;
+ if (arg == NULL)
+ {
+ error (0, 0, _("%s:%lu: invalid line; missing second token"),
+ filename, (long unsigned) line_number);
+ err = 1;
+ free (keywd);
+ continue;
+ }
+
unrecognized = 0;
if (strcasecmp (keywd, "TERM") == 0)
{