Skip to content

Commit

Permalink
db2_ops: safety check for input parameter
Browse files Browse the repository at this point in the history
(cherry picked from commit 1be7a69)
  • Loading branch information
miconda committed Dec 8, 2017
1 parent e5d96de commit edb3c0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/db2_ops/db2_ops.c
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/modules/jsonrpcc/jsonrpc_io.c
Expand Up @@ -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);
Expand Down

0 comments on commit edb3c0a

Please sign in to comment.