[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sip-implementors
Subject:    Re: [Sip-implementors] Max length of To/ From headers
From:       worley () ariadne ! com (Dale R !  Worley)
Date:       2015-11-16 16:09:52
Message-ID: 87si46hqnj.fsf () hobgoblin ! ariadne ! com
[Download RAW message or body]

Arun Arora <arun.arora.dev@gmail.com> writes:
> Hi Dale, The crash is exactly I am trying to avoid, plus I don't want
> to rely on the API user to add NUL at the end. Yes, I am using char *

In that case, you can use pointer/length pairs (as others have noted).

But of course, if you can't depend on the caller giving you valid
arguments, then you can't depend on the pointer being valid, or the
length being sane, and you have to validate those arguments before you
use them.

Dale
_______________________________________________
Sip-implementors mailing list
Sip-implementors@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic