Browse code

avposp: use state in searching first avp in avp_copy

- state parameter was missing when searching first avp, keeping it
uninitialized when searching the next, causing a crash when flag 'g'
was used in avp_copy
- reported by Jon Bonilla (Manwe)
(cherry picked from commit 027d68e9cc7afcdb3ba8922215a28e33a5225097)

Daniel-Constantin Mierla authored on 06/05/2010 19:09:47 • Andrei Pelinescu-Onciul committed on 28/05/2010 18:46:35
Showing 1 changed files
... ...
@@ -842,7 +842,7 @@ int ops_copy_avp( struct sip_msg* msg, struct fis_param* src,
842 842
 		goto error;
843 843
 	}
844 844
 
845
-	avp = search_first_avp( name_type1, avp_name1, &avp_val, 0);
845
+	avp = search_first_avp( name_type1, avp_name1, &avp_val, &st);
846 846
 	while ( avp )
847 847
 	{
848 848
 		/* build a new avp with new name, but old value */