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

List:       openser-devel
Subject:    [sr-dev] git:master: xhttp: safety checks for null parameter values
From:       Daniel-Constantin Mierla <miconda () gmail ! com>
Date:       2010-12-30 23:43:39
Message-ID: 20101230234339.36CB7EF8079 () rimmer
[Download RAW message or body]

Module: sip-router
Branch: master
Commit: b5866451f323aa892bb48ba86424d6a45d8108b5
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b5866451f323aa892bb48ba86424d6a45d8108b5


Author: Daniel-Constantin Mierla <miconda@gmail.com>
Committer: Daniel-Constantin Mierla <miconda@gmail.com>
Date:   Fri Dec 31 00:40:32 2010 +0100

xhttp: safety checks for null parameter values

---

 modules/xhttp/xhttp_mod.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/xhttp/xhttp_mod.c b/modules/xhttp/xhttp_mod.c
index 22ebcc4..1c5ff7e 100644
--- a/modules/xhttp/xhttp_mod.c
+++ b/modules/xhttp/xhttp_mod.c
@@ -362,7 +362,7 @@ static int xhttp_send_reply(sip_msg_t *msg, int code, str \
*reason,  {
 	str tbuf;
 
-	if(ctype->len>0)
+	if(ctype!=NULL && ctype->len>0)
 	{
 		/* add content-type */
 		tbuf.len=sizeof("Content-Type: ") - 1 + ctype->len + CRLF_LEN;
@@ -386,7 +386,7 @@ static int xhttp_send_reply(sip_msg_t *msg, int code, str \
*reason,  pkg_free(tbuf.s);
 	}
 
-	if(body->len>0)
+	if(body!=NULL && body->len>0)
 	{
 		if (add_lump_rpl(msg, body->s, body->len, LUMP_RPL_BODY) < 0)
 		{


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


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

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