Skip to content

Commit

Permalink
async DB core: fix possible buffer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Jan 23, 2015
1 parent 92755be commit 257e84b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db/db.c
Expand Up @@ -310,7 +310,8 @@ db_con_t* db_do_init(const str* url, void* (*new_connection)())
}

if (!con->transfers) {
con->transfers = pkg_malloc(db_max_async_connections);
con->transfers = pkg_malloc(db_max_async_connections *
sizeof *con->transfers);
if (!con->transfers) {
LM_ERR("no more pkg\n");
goto err;
Expand Down

0 comments on commit 257e84b

Please sign in to comment.