From 9787368c034943fbc035cb37b881988909a8c511 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 11 May 2011 10:45:47 +0200 Subject: feh_parse_options_from_string: Make sure not to write beyond array boundaries --- src/options.c | 5 +++++ 1 file changed, 5 insertions(+) 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++; -- cgit v1.2.3