瀏覽代碼

- 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;