Commit b8a79da6 authored by Slava Monich's avatar Slava Monich

[mms_codec] Handle empty header values

parent 21f79922
......@@ -473,6 +473,13 @@ static const char *decode_text(struct wsp_header_iter *iter)
const unsigned char *p;
unsigned int l;
if (wsp_header_iter_get_val_type(iter) == WSP_VALUE_TYPE_LONG) {
if (iter->len == 0) /* The only way to encode an empty string */
return (char*)(iter->pdu + iter->pos - 1);
return NULL;
if (wsp_header_iter_get_val_type(iter) != WSP_VALUE_TYPE_TEXT)
return NULL;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment