[sr-dev] git:master:65e0b1a3: misctest: close file if buffer size is not enough
Daniel-Constantin Mierla
miconda at gmail.com
Mon Sep 13 08:10:56 CEST 2021
Module: kamailio
Branch: master
Commit: 65e0b1a3248a1ee183864b17f719b9fd8cb9e64b
URL: https://github.com/kamailio/kamailio/commit/65e0b1a3248a1ee183864b17f719b9fd8cb9e64b
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-09-13T08:09:38+02:00
misctest: close file if buffer size is not enough
---
Modified: src/modules/misctest/misctest_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/65e0b1a3248a1ee183864b17f719b9fd8cb9e64b.diff
Patch: https://github.com/kamailio/kamailio/commit/65e0b1a3248a1ee183864b17f719b9fd8cb9e64b.patch
---
diff --git a/src/modules/misctest/misctest_mod.c b/src/modules/misctest/misctest_mod.c
index 2b304c6b5d..2a263432d1 100644
--- a/src/modules/misctest/misctest_mod.c
+++ b/src/modules/misctest/misctest_mod.c
@@ -294,6 +294,7 @@ static int misctest_message_init(void)
if(fsize>=BUF_SIZE-2) {
LM_ERR("the file data is too big\n");
+ fclose(f);
return -1;
}
More information about the sr-dev
mailing list