From cdf371e92ec5f38054126de555851ce444bc05dd Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Fri, 10 Apr 2020 15:15:14 +0200 Subject: [PATCH] - fixed: MmsValue_printToBuffer fails with empty MMS_OCTET_STRING (#227) --- src/mms/iso_mms/common/mms_value.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mms/iso_mms/common/mms_value.c b/src/mms/iso_mms/common/mms_value.c index 44b58139..4336372f 100644 --- a/src/mms/iso_mms/common/mms_value.c +++ b/src/mms/iso_mms/common/mms_value.c @@ -2007,6 +2007,9 @@ MmsValue_printToBuffer(const MmsValue* self, char* buffer, int bufferSize) return buffer; } + if (bufferSize) + buffer[0] = 0; + switch (MmsValue_getType(self)) { case MMS_STRUCTURE: