diff options
author | Marco Peereboom <marco@conformal.com> | 2011-07-18 16:32:45 +0000 |
---|---|---|
committer | Marco Peereboom <marco@conformal.com> | 2011-07-18 16:32:45 +0000 |
commit | c54ab7df88ee7c00c8e6e1703303db0b1e0b6a19 (patch) | |
tree | 658ffe1de1ecfdbf62453f6a38033caf5c616bc2 | |
parent | 2ff98b9a8a3934e013b147137c753ae41ec106a2 (diff) | |
download | xombrero-c54ab7df88ee7c00c8e6e1703303db0b1e0b6a19.tar.gz |
Fix a logic bug in add_mime_type() that could result in a NULL pointer
dereference in case of invalid parameters. From: Fabian Keil <fk@fabiankeil.de>
-rw-r--r-- | xxxterm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xxxterm.c b/xxxterm.c index cc4d1b5..b33ee11 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -1591,7 +1591,7 @@ add_mime_type(struct settings *s, char *line) /* XXX this could be smarter */ - if (line == NULL && strlen(line) == 0) { + if (line == NULL || strlen(line) == 0) { show_oops(NULL, "add_mime_type invalid parameters"); return (1); } |