> From: Peter Krebs [[email protected]]
> 
> I noticed, to my horror, that the SIP grammar actually allows ASCII NULL
> characters in certain message elements (Reason-Phrase, quoted string,...are
> there any more?). Is there any actual sense in using this characters in said
> elements other than giving C programmers a headache that I am not aware of?

Actually, I was surprised to see that you're right:

    quoted-pair  =  "\" (%x00-09 / %x0B-0C
                    / %x0E-7F)

But the problem is more subtle than you think.  SIP messages (headers,
really) are UTF-8 encoded Unicode, not ASCII.  Although UTF-8 doesn't
generate zero bytes, the RFC 3261 grammar is extended to add code
points from 0 to 31.

> Otherwise I plan to simply treat NULL characters as invalid - does anyone
> know of implementations with which this would lead to interoperability
> problems?

I've never seen anyone use the "control character" code points, but it
seems risky to not process them correctly.

Dale

_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to