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

core:parser fix possible bug in msg_parser

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

+ 1 - 1
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* get_hdr_field(char* const buf, char* const end, struct hdr_field* const 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;