From f5fceab0504ea4af8b1e253303a6e160579fb606 Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Mon, 28 Jul 2025 16:01:16 +0100 Subject: [PATCH] - fixed handling of invalid object references in IedConnection_setGoCBValuesAsync --- src/iec61850/client/client_goose_control.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/iec61850/client/client_goose_control.c b/src/iec61850/client/client_goose_control.c index 118401e2..d079dacb 100644 --- a/src/iec61850/client/client_goose_control.c +++ b/src/iec61850/client/client_goose_control.c @@ -985,7 +985,8 @@ IedConnection_setGoCBValuesAsync(IedConnection self, IedClientError* error, Clie if (MmsMapping_getMmsDomainFromObjectReference(goCB->objectReference, domainId) == NULL) { - *error = IED_ERROR_OBJECT_REFERENCE_INVALID;; + *error = IED_ERROR_OBJECT_REFERENCE_INVALID; + return 0; } char* itemIdStart = goCB->objectReference + strlen(domainId) + 1; @@ -995,7 +996,7 @@ IedConnection_setGoCBValuesAsync(IedConnection self, IedClientError* error, Clie if (separator == NULL) { *error = IED_ERROR_OBJECT_REFERENCE_INVALID; - goto exit_function; + return 0; } int separatorOffset = separator - itemIdStart;