From c6743b76060d82e5f47fc3d50699187386760e1f Mon Sep 17 00:00:00 2001 From: kevin1018 Date: Fri, 27 Oct 2017 18:21:18 +0800 Subject: [PATCH] fix bufpos check error --- src/mms/iso_mms/common/mms_common_msg.c | 4 ++++ 1 file changed, 4 insertions(+) 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;