Browse Source

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

Daniel-Constantin Mierla 22 years ago
parent
commit
9976cb2537
1 changed files with 1 additions and 1 deletions
  1. 1 1
      data_lump_rpl.c

+ 1 - 1
data_lump_rpl.c

@@ -69,7 +69,7 @@ int add_lump_rpl(struct sip_msg * msg, struct lump_rpl* lump)
 {
 	struct lump_rpl *foo;
 
-	if (lump->text.s==0 || lump->text.len==0) {
+	if (lump==0 || lump->text.s==0 || lump->text.len==0) {
 		LOG(L_ERR,"ERROR:add_lump_rpl: I won't add an empty lump!\n");
 		return -1;
 	}