소스 검색

added null-ptr handling to some more calcSize-methods

Leon Urbas 11 년 전
부모
커밋
91c5ff4d63
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      tool/opcua_basictypes.c

+ 2 - 2
tool/opcua_basictypes.c

@@ -400,10 +400,10 @@ Int32 UA_NodeId_calcSize(UA_NodeId const *p) {
 			length += sizeof(UA_Byte) + sizeof(UA_UInt16) + UA_String_calcSize(&(p->identifier.string));
 			break;
 		case NIEVT_GUID:
-			length += sizeof(UA_Byte) + sizeof(UA_UInt16) + UA_Guid_calcSize(&(nodeId->identifier.guid));
+			length += sizeof(UA_Byte) + sizeof(UA_UInt16) + UA_Guid_calcSize(&(p->identifier.guid));
 			break;
 		case NIEVT_BYTESTRING:
-			length += sizeof(UA_Byte) + sizeof(UA_UInt16) + UA_ByteString_calcSize(&(nodeId->identifier.byteString));
+			length += sizeof(UA_Byte) + sizeof(UA_UInt16) + UA_ByteString_calcSize(&(p->identifier.byteString));
 			break;
 		default:
 			break;