ソースを参照

Fix double free of node id

See https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4296

Credit to oss-fuzz
Stefan Profanter 7 年 前
コミット
9165b056a9
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      src/ua_types_encoding_binary.c

+ 1 - 1
src/ua_types_encoding_binary.c

@@ -943,7 +943,7 @@ ExtensionObject_decodeBinaryContent(UA_ExtensionObject *dst, const UA_NodeId *ty
     /* Unknown type, just take the binary content */
     if(!type) {
         dst->encoding = UA_EXTENSIONOBJECT_ENCODED_BYTESTRING;
-        dst->content.encoded.typeId = *typeId;
+        UA_NodeId_copy(typeId, &dst->content.encoded.typeId);
         return ByteString_decodeBinary(&dst->content.encoded.body);
     }