Skip to content

Commit

Permalink
acc: Fix buffer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Nov 22, 2018
1 parent 0cd9bba commit 5a147c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/acc/acc.c
Expand Up @@ -1687,6 +1687,9 @@ int set_dlg_value(str *value)
if (cdr_buf.len + value->len + 2 > cdr_len) {
if (cdr_len == 0) {
cdr_len = STRING_INIT_SIZE;
while (cdr_len < cdr_buf.len + value->len + 2)
cdr_len *= 2;

cdr_buf.s = (char*)pkg_malloc(cdr_len);
if (!cdr_buf.s) {
LM_ERR("No more memory\n");
Expand Down

0 comments on commit 5a147c6

Please sign in to comment.