From: Hans Dedecker Date: Mon, 1 Feb 2016 09:56:24 +0000 (+0100) Subject: interface-event: Fix possible out of bounds array access X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=418f63b98f8cc9a4316f7dce4889400afd6ca3aa interface-event: Fix possible out of bounds array access The array eventnames is of size 3 while the interface_event type may use the indexes 3 or 4. Signed-off-by: Hans Dedecker --- diff --git a/interface-event.c b/interface-event.c index cfbc15c..3cdfbdb 100644 --- a/interface-event.c +++ b/interface-event.c @@ -30,7 +30,7 @@ static void task_complete(struct uloop_process *proc, int ret); static struct uloop_process task = { .cb = task_complete, }; -static const char * const eventnames[] = {"ifdown", "ifup", "ifupdate"}; +static const char * const eventnames[] = {"ifdown", "ifup", "ifupdate", "free", "reload"}; static void run_cmd(const char *ifname, const char *device, enum interface_event event,