From 1f9c6b08d3510a187271faa3dc2ae62fd04c607a Mon Sep 17 00:00:00 2001 From: Jeff Lyons Date: Fri, 13 Mar 2020 08:19:16 +0000 Subject: [PATCH] add default response to get_value_security_mode to prevent SEGV --- dmtree/tr181/wifi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dmtree/tr181/wifi.c b/dmtree/tr181/wifi.c index a1dfb024..3aacbad3 100644 --- a/dmtree/tr181/wifi.c +++ b/dmtree/tr181/wifi.c @@ -1468,6 +1468,8 @@ static void get_value_security_mode(char **value, char *encryption, char *cipher *value = "WPA-WPA2-Personal"; else if (strcmp(encryption, "wpa-mixed") == 0 || strcmp(encryption, "mixed-wpa") == 0) *value = "WPA-WPA2-Enterprise"; + else + *value = "unknown"; } static int get_access_point_security_modes(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)