[sr-dev] git:master: core:parser fix possible bug in msg_parser

Marius Zbihlei marius.zbihlei at 1and1.ro
Mon Sep 17 16:36:09 CEST 2012


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

Author: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Date:   Mon Sep 17 17:34:57 2012 +0300

core:parser fix possible bug in msg_parser

If buffer was NULL, tmp was returned uninitialized, thus possible to cause problems

---

 parser/msg_parser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/parser/msg_parser.c b/parser/msg_parser.c
index b279e47..7c9c04e 100644
--- a/parser/msg_parser.c
+++ b/parser/msg_parser.c
@@ -88,7 +88,7 @@ unsigned int global_req_flags = 0;
 char* get_hdr_field(char* const buf, char* const end, struct hdr_field* const hdr)
 {
 
-	char* tmp;
+	char *tmp = 0;
 	char *match;
 	struct via_body *vb;
 	struct cseq_body* cseq_b;




More information about the sr-dev mailing list