Browse Source

Merge branch 'master' of https://github.com/open62541/open62541

ichrispa 9 years ago
parent
commit
d9bf847366
3 changed files with 16 additions and 2 deletions
  1. 4 0
      src/server/ua_server_binary.c
  2. 2 2
      src/server/ua_subscription.h
  3. 10 0
      tools/travis/travis_linux_script.sh

+ 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);

+ 2 - 2
src/server/ua_subscription.h

@@ -60,7 +60,7 @@ typedef struct UA_unpublishedNotification {
     UA_NotificationMessage notification;
 } UA_unpublishedNotification;
 
-typedef struct UA_Subscription {
+struct UA_Subscription {
     LIST_ENTRY(UA_Subscription) listEntry;
     UA_BoundedUInt32 lifeTime;
     UA_BoundedUInt32 keepAliveCount;
@@ -76,7 +76,7 @@ typedef struct UA_Subscription {
     LIST_HEAD(UA_ListOfUnpublishedNotifications, UA_unpublishedNotification) unpublishedNotifications;
     size_t unpublishedNotificationsSize;
     LIST_HEAD(UA_ListOfUAMonitoredItems, UA_MonitoredItem) MonitoredItems;
-} UA_Subscription;
+};
 
 UA_Subscription *UA_Subscription_new(UA_UInt32 subscriptionID);
 void UA_Subscription_deleteMembers(UA_Subscription *subscription, UA_Server *server);

+ 10 - 0
tools/travis/travis_linux_script.sh

@@ -11,6 +11,16 @@ if [ $ANALYZE = "true" ]; then
           -enable-checker security.insecureAPI.UncheckedReturn \
           --status-bugs -v \
           make -j 8
+		cd .. && rm build -rf
+
+		mkdir -p build
+		cd build
+        scan-build cmake -G "Unix Makefiles" -DUA_ENABLE_AMALGAMATION=ON ..
+        scan-build -enable-checker security.FloatLoopCounter \
+          -enable-checker security.insecureAPI.UncheckedReturn \
+          --status-bugs -v \
+          make -j 8
+		cd .. && rm build -rf
     else
         cppcheck --template "{file}({line}): {severity} ({id}): {message}" \
             --enable=style --force --std=c++11 -j 8 \