- fixed bug in MmsConnection_readMultipleVariables: send invaid messsage and memory access errors when too many items are passed to the function exhausting MMS payload size

pull/265/head
Michael Zillgith 5 years ago
parent ee4da06690
commit 6a3c66eafa

@ -2447,8 +2447,7 @@ MmsConnection_readMultipleVariablesAsync(MmsConnection self, MmsError* mmsError,
invokeId = getNextInvokeId(self);
mmsClient_createReadRequestMultipleValues(invokeId, domainId, items, payload);
if (mmsClient_createReadRequestMultipleValues(invokeId, domainId, items, payload) > 0) {
MmsClientInternalParameter intParam;
intParam.ptr = NULL;
@ -2456,6 +2455,11 @@ MmsConnection_readMultipleVariablesAsync(MmsConnection self, MmsError* mmsError,
if (mmsError)
*mmsError = err;
}
else {
if (mmsError)
*mmsError = MMS_ERROR_RESOURCE_CAPABILITY_UNAVAILABLE;
}
exit_function:
return invokeId;

Loading…
Cancel
Save