浏览代码

textopsx: init local variable to avoid testing invalid value

Daniel-Constantin Mierla 11 年之前
父节点
当前提交
f0186bf375
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      modules/textopsx/textopsx.c

+ 2 - 1
modules/textopsx/textopsx.c

@@ -1200,7 +1200,8 @@ static int assign_hf_process2_params(struct sip_msg* msg, struct hdr_field* hf,
 static int insupddel_hf_value_f(struct sip_msg* msg, char* _hname, char* _val) {
 	struct hname_data* hname = (void*) _hname;
 	struct hdr_field* hf;
-	str val, hval1, hval2;
+	str val = {0};
+	str hval1, hval2;
 	int res;
 
 	if (_val) {