Module: kamailio Branch: master Commit: 1be7a6903ace085e7518fa0d358a4ca899ee938f URL: https://github.com/kamailio/kamailio/commit/1be7a6903ace085e7518fa0d358a4ca899ee938f
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-12-08T16:50:51+01:00 db2_ops: safety check for input parameter --- Modified: src/modules/db2_ops/db2_ops.c Modified: src/modules/jsonrpcc/jsonrpc_io.c --- Diff: https://github.com/kamailio/kamailio/commit/1be7a6903ace085e7518fa0d358a4ca899ee938f.diff Patch: https://github.com/kamailio/kamailio/commit/1be7a6903ace085e7518fa0d358a4ca899ee938f.patch --- diff --git a/src/modules/db2_ops/db2_ops.c b/src/modules/db2_ops/db2_ops.c index 647faceb1c..dca2c81a1c 100644 --- a/src/modules/db2_ops/db2_ops.c +++ b/src/modules/db2_ops/db2_ops.c @@ -201,6 +201,9 @@ static int split_fields(char *part, int *n, struct xlstr **strs) { int i, res; char *c, *fld; + if(part==NULL || *part=='\0') + return -1; + *n = 0; *strs = 0; c = part; diff --git a/src/modules/jsonrpcc/jsonrpc_io.c b/src/modules/jsonrpcc/jsonrpc_io.c index ae96ace9c0..ddefd1b3a1 100644 --- a/src/modules/jsonrpcc/jsonrpc_io.c +++ b/src/modules/jsonrpcc/jsonrpc_io.c @@ -219,6 +219,7 @@ void cmd_pipe_cb(int fd, short event, void *arg) if (timerfd_settime(timerfd, 0, itime, NULL) == -1) { LM_ERR("Could not set timer."); + pkg_free(itime); goto error; } pkg_free(itime); _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev