[sr-dev] git:master:d6f16797: app_perl: use snprintf instead of sprintf

Daniel-Constantin Mierla miconda at gmail.com
Thu Nov 28 20:09:33 CET 2019


Module: kamailio
Branch: master
Commit: d6f16797a0f895189d4a0ef2ea8fbd68acf0144e
URL: https://github.com/kamailio/kamailio/commit/d6f16797a0f895189d4a0ef2ea8fbd68acf0144e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-11-28T20:08:57+01:00

app_perl: use snprintf instead of sprintf

---

Modified: src/modules/app_perl/app_perl_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/d6f16797a0f895189d4a0ef2ea8fbd68acf0144e.diff
Patch: https://github.com/kamailio/kamailio/commit/d6f16797a0f895189d4a0ef2ea8fbd68acf0144e.patch

---

diff --git a/src/modules/app_perl/app_perl_mod.c b/src/modules/app_perl/app_perl_mod.c
index 954b354638..31b001c9b9 100644
--- a/src/modules/app_perl/app_perl_mod.c
+++ b/src/modules/app_perl/app_perl_mod.c
@@ -220,7 +220,7 @@ PerlInterpreter *parser_init(void) {
 						PKG_MEM_ERROR;
 						return NULL;
 					}
-					sprintf(argv[argc], "-I%s", entry);
+					snprintf(argv[argc], strlen(entry)+20, "-I%s", entry);
 					modpathset_end = argc;
 					argc++;
 				}




More information about the sr-dev mailing list