Преглед изворни кода

core:parser fix possible bug in msg_parser

If buffer was NULL, tmp was returned uninitialized, thus possible to cause problems
(cherry picked from commit cccdaead04411175c46dd660c91c037c45f80c33)
Marius Zbihlei пре 13 година
родитељ
комит
f5df3a2509
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      parser/msg_parser.c

+ 1 - 1
parser/msg_parser.c

@@ -91,7 +91,7 @@ unsigned int global_req_flags = 0;
 char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr)
 char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr)
 {
 {
 
 
-	char* tmp;
+	char *tmp = 0;
 	char *match;
 	char *match;
 	struct via_body *vb;
 	struct via_body *vb;
 	struct cseq_body* cseq_b;
 	struct cseq_body* cseq_b;