Procházet zdrojové kódy

textopsx: init local variable to avoid testing invalid value

Daniel-Constantin Mierla před 11 roky
rodič
revize
f0186bf375
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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) {
 static int insupddel_hf_value_f(struct sip_msg* msg, char* _hname, char* _val) {
 	struct hname_data* hname = (void*) _hname;
 	struct hname_data* hname = (void*) _hname;
 	struct hdr_field* hf;
 	struct hdr_field* hf;
-	str val, hval1, hval2;
+	str val = {0};
+	str hval1, hval2;
 	int res;
 	int res;
 
 
 	if (_val) {
 	if (_val) {