diff --git a/src/mms/iso_mms/common/mms_common_msg.c b/src/mms/iso_mms/common/mms_common_msg.c index 55da14df..6a6ef06a 100644 --- a/src/mms/iso_mms/common/mms_common_msg.c +++ b/src/mms/iso_mms/common/mms_common_msg.c @@ -377,6 +377,10 @@ mmsMsg_openFile(const char* basepath, char* fileName, bool readWrite) bool mmsMsg_parseFileName(char* filename, uint8_t* buffer, int* bufPos, int maxBufPos , uint32_t invokeId, ByteBuffer* response) { + if (*bufPos == maxBufPos) { + return true; + } + uint8_t tag = buffer[(*bufPos)++]; int length;