From 6b0c4f0ec586d3059d583ca64497268529a7b432 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sun, 22 May 2016 18:46:05 +0200 Subject: ipcpd: shim-udp: fixed missing NULL check Conf was not checked on bootstrap. --- src/ipcpd/shim-udp/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c index 1e58a8fc..0fc1c78a 100644 --- a/src/ipcpd/shim-udp/main.c +++ b/src/ipcpd/shim-udp/main.c @@ -871,6 +871,9 @@ static int ipcp_udp_bootstrap(struct dif_config * conf) int enable = 1; int fd = -1; + if (conf == NULL) + return -1; /* -EINVAL */ + if (conf->type != THIS_TYPE) { LOG_ERR("Config doesn't match IPCP type."); return -1; -- cgit v1.2.3