From: Russell Bryant Date: Fri, 5 May 2006 21:43:06 +0000 (+0000) Subject: fix the return value of gettag() to only return the pointer to the provided X-Git-Tag: 1.4.0-beta1~1551 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e91afbaef120261c80921ff06cea9c78135c57a8;p=thirdparty%2Fasterisk.git fix the return value of gettag() to only return the pointer to the provided tag buffer if the tag was actually found. There is code that checks to see if this result is non-zero to determine whether the tag was found or not. (issue #7092, mikma) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25060 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2d7c6cd0d2..c13d9a9ce0 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10795,8 +10795,9 @@ static const char *gettag(const struct sip_request *req, char *header, char *tag sep = strchr(tagbuf, ';'); if (sep) *sep = '\0'; + return tagbuf; } - return tagbuf; + return NULL; } /*! \brief Handle incoming notifications */