|
|
|
@ -319,7 +319,7 @@ mmsMsg_parseDataElement(Data_t* dataElement)
|
|
|
|
|
|
|
|
|
|
int size = dataElement->choice.bitstring.size;
|
|
|
|
|
|
|
|
|
|
if (size > 0) {
|
|
|
|
|
if (size >= 0) {
|
|
|
|
|
|
|
|
|
|
int maxSize = (size * 8);
|
|
|
|
|
int bitSize = maxSize - dataElement->choice.bitstring.bits_unused;
|
|
|
|
@ -335,6 +335,13 @@ mmsMsg_parseDataElement(Data_t* dataElement)
|
|
|
|
|
memcpy(value->value.bitString.buf,
|
|
|
|
|
dataElement->choice.bitstring.buf, size);
|
|
|
|
|
}
|
|
|
|
|
else if (bitSize == 0) {
|
|
|
|
|
value = (MmsValue*) GLOBAL_CALLOC(1, sizeof(MmsValue));
|
|
|
|
|
|
|
|
|
|
value->type = MMS_BIT_STRING;
|
|
|
|
|
value->value.bitString.size = 0;
|
|
|
|
|
value->value.bitString.buf = NULL;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (DEBUG_MMS_CLIENT)
|
|
|
|
|
printf("MMS CLIENT: error parsing data element (bit string padding problem)!\n");
|
|
|
|
|