Module: kamailio
Branch: master
Commit: 598969df126af4ad4d2283e37078e1afe8773a32
URL:
https://github.com/kamailio/kamailio/commit/598969df126af4ad4d2283e37078e1a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-10-05T10:41:38+02:00
misctest: allow testing with larger message size than core accepts
---
Modified: src/modules/misctest/misctest_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/598969df126af4ad4d2283e37078e1a…
Patch:
https://github.com/kamailio/kamailio/commit/598969df126af4ad4d2283e37078e1a…
---
diff --git a/src/modules/misctest/misctest_mod.c b/src/modules/misctest/misctest_mod.c
index c00a8b9c5c0..e0108b5a76b 100644
--- a/src/modules/misctest/misctest_mod.c
+++ b/src/modules/misctest/misctest_mod.c
@@ -265,13 +265,13 @@ static int misctest_memory_init(void)
static int misctest_message_init(void)
{
- char tbuf[BUF_SIZE];
+ char tbuf[4*BUF_SIZE];
FILE *f;
long fsize;
sip_msg_t tmsg = { };
if(misctest_message_data.s!=0 && misctest_message_data.len>0) {
- if(misctest_message_data.len>=BUF_SIZE-2) {
+ if(misctest_message_data.len>=4*BUF_SIZE-2) {
LM_ERR("the data is too big\n");
return -1;
}
@@ -297,7 +297,7 @@ static int misctest_message_init(void)
}
fseek(f, 0, SEEK_SET);
- if(fsize>=BUF_SIZE-2) {
+ if(fsize>=4*BUF_SIZE-2) {
LM_ERR("the file data is too big\n");
fclose(f);
return -1;