From: Jo-Philipp Wich Date: Thu, 28 Feb 2013 13:07:22 +0000 (+0100) Subject: use dup'ed string in fw3_parse_monthdays() X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=commitdiff_plain;h=4b8604dfbc46d3923d9506951560a0918207b4a6 use dup'ed string in fw3_parse_monthdays() --- diff --git a/options.c b/options.c index ff9a964..a35247f 100644 --- a/options.c +++ b/options.c @@ -636,7 +636,7 @@ fw3_parse_monthdays(void *ptr, const char *val) if (!(s = strdup(val))) return false; - for (p = strtok((char *)val, " \t"); p; p = strtok(NULL, " \t")) + for (p = strtok(s, " \t"); p; p = strtok(NULL, " \t")) { d = strtoul(p, &p, 10);