- MMS_SERVER: fixed bug in getNameList request handling when domain ID is too long (LIB61850-346)

v1.6_develop_rgoose_sntp
Michael Zillgith 3 years ago
parent 75c1e89bba
commit 5453e885e9

@ -535,7 +535,7 @@ mmsServer_handleGetNameListRequest(
} }
else { else {
if (DEBUG_MMS_SERVER) if (DEBUG_MMS_SERVER)
printf("MMS_SERVER: getNameListRequest - continuer after variable name too long\n"); printf("MMS_SERVER: getNameListRequest - continuer after variable name too long (%i > 129)\n", continueAfterLength);
mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response); mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response);
return; return;
@ -543,7 +543,15 @@ mmsServer_handleGetNameListRequest(
} }
if (objectScope == OBJECT_SCOPE_DOMAIN) { if (objectScope == OBJECT_SCOPE_DOMAIN) {
char domainSpecificName[130]; char domainSpecificName[65];
if (domainIdLength > 64) {
if (DEBUG_MMS_SERVER)
printf("MMS_SERVER: getNameListRequest - domain name too long (%i > 64)\n", domainIdLength);
mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response);
return;
}
memcpy(domainSpecificName, domainId, domainIdLength); memcpy(domainSpecificName, domainId, domainIdLength);
domainSpecificName[domainIdLength] = 0; domainSpecificName[domainIdLength] = 0;

Loading…
Cancel
Save