소스 검색

Fix #590: Possible nullpointer in decode if invalid message

Stefan Profanter 9 년 전
부모
커밋
f80def1ff8
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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);