Browse code

- check if the lump parameter is NULL to avoid segmentation fault

Daniel-Constantin Mierla authored on 12/10/2003 10:46:27
Showing 1 changed files
... ...
@@ -69,7 +69,7 @@ int add_lump_rpl(struct sip_msg * msg, struct lump_rpl* lump)
69 69
 {
70 70
 	struct lump_rpl *foo;
71 71
 
72
-	if (lump->text.s==0 || lump->text.len==0) {
72
+	if (lump==0 || lump->text.s==0 || lump->text.len==0) {
73 73
 		LOG(L_ERR,"ERROR:add_lump_rpl: I won't add an empty lump!\n");
74 74
 		return -1;
75 75
 	}