소스 검색

- extra test added - lump carrying empty strings will not be added

Bogdan-Andrei Iancu 22 년 전
부모
커밋
b68010212d
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      data_lump_rpl.c

+ 5 - 0
data_lump_rpl.c

@@ -69,6 +69,11 @@ 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) {
+		LOG(L_ERR,"ERROR:add_lump_rpl: I won't add an empty lump!\n");
+		return -1;
+	}
+
 	if (!msg->reply_lump)
 	{
 		msg->reply_lump = lump;