[sr-dev] [kamailio/kamailio] sdpops: Parsing of a multipart INVITE body (SDP + an unknown MIME type) (#561)
foucse
notifications at github.com
Mon Apr 4 19:30:05 CEST 2016
I have taken some time to investigate this issue and the problem is that you use the "isalpha" function in the is_mime_char routine:
```C
#define is_mime_char(_c_) \
(isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || (_c_)=='_')
```
But a MIME type can have digits in it (as you can see in some MIME types registered with IANA: http://www.iana.org/assignments/media-types/media-types.xhtml)
So a more convenient validation function would be "isalnum":
```C
#define is_mime_char(_c_) \
(isalnum((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || (_c_)=='_')
```
After changing this, there is no more parsing errors.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/561#issuecomment-205406611
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160404/b1b55a53/attachment-0001.html>
More information about the sr-dev
mailing list