summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-11 10:45:47 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-11 10:45:47 +0200
commit9787368c034943fbc035cb37b881988909a8c511 (patch)
treee5ddf0c73d1c9d1041375676c329e448bf72672e
parentd5c47b63063a892e62cc9852bbfc639f4238bc7f (diff)
feh_parse_options_from_string: Make sure not to write beyond array boundaries
-rw-r--r--src/options.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c
index 70686cc..f4d4029 100644
--- a/src/options.c
+++ b/src/options.c
@@ -238,6 +238,11 @@ static void feh_parse_options_from_string(char *opts)
list[num++] = estrdup(PACKAGE);
for (s = opts, t = opts;; t++) {
+
+ if (num > 64)
+ eprintf(PACKAGE " does not support more than 64 words per "
+ "theme definition.\n Please shorten your lines.");
+
if ((*t == ' ') && !(inquote)) {
*t = '\0';
num++;