Explorar el Código

Fix #590: Possible nullpointer in decode if invalid message

Stefan Profanter hace 9 años
padre
commit
f80def1ff8
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/server/ua_server_binary.c

+ 4 - 0
src/server/ua_server_binary.c

@@ -440,6 +440,10 @@ processMSG(UA_Connection *connection, UA_Server *server, const UA_ByteString *ms
         }
 
         return;
+    default:
+        UA_LOG_INFO(server->config.logger, UA_LOGCATEGORY_SECURECHANNEL,
+            "Received unknown message chunk: %c", msg->data[*pos - 24 + 3]);
+        return;
     }
 
     retval |= UA_NodeId_decodeBinary(&bytes, pos, &requestTypeId);