Pārlūkot izejas kodu

Fix processBinaryMessage freeing memory which it is not allowed

Only copying the buffer is not reallocating.
Setting realloced to true causes processBinaryMessage to call
UA_ByteArray_deleteMembers instead of connection->releaseRecvBuffer
Stefan Profanter 7 gadi atpakaļ
vecāks
revīzija
2bd5563847
1 mainītis faili ar 0 papildinājumiem un 1 dzēšanām
  1. 0 1
      src/ua_connection.c

+ 0 - 1
src/ua_connection.c

@@ -108,7 +108,6 @@ separateIncompleteChunk(UA_Connection *connection, UA_ByteString * UA_RESTRICT m
                 return retval;
                 return retval;
             memcpy(connection->incompleteMessage.data, message->data, message->length);
             memcpy(connection->incompleteMessage.data, message->data, message->length);
             connection->releaseRecvBuffer(connection, message);
             connection->releaseRecvBuffer(connection, message);
-            *realloced = true;
         } else {
         } else {
             connection->incompleteMessage = *message;
             connection->incompleteMessage = *message;
             *message = UA_BYTESTRING_NULL;
             *message = UA_BYTESTRING_NULL;