Browse Source

Stack: Check for NULL config

Stefan Profanter 5 years ago
parent
commit
d874c0fff7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      plugins/ua_config_default.c

+ 3 - 0
plugins/ua_config_default.c

@@ -98,6 +98,9 @@ static UA_UsernamePasswordLogin usernamePasswords[2] = {
 
 static UA_StatusCode
 setDefaultConfig(UA_ServerConfig *conf) {
+	if (!conf)
+		return UA_STATUSCODE_BADINVALIDARGUMENT;
+
     /* Zero out.. All members have a valid initial value */
     UA_ServerConfig_clean(conf);
     memset(conf, 0, sizeof(UA_ServerConfig));