Module: kamailio
Branch: 5.6
Commit: 13229397a2b72ea7f790291ee9e9c03d17fa6680
URL:
https://github.com/kamailio/kamailio/commit/13229397a2b72ea7f790291ee9e9c03…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-10-06T10:33:38+02:00
misctest: allow testing with larger message size than core accepts
(cherry picked from commit 598969df126af4ad4d2283e37078e1afe8773a32)
---
Modified: src/modules/misctest/misctest_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/13229397a2b72ea7f790291ee9e9c03…
Patch:
https://github.com/kamailio/kamailio/commit/13229397a2b72ea7f790291ee9e9c03…
---
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;