Module: sip-router
Branch: master
Commit: a306ea024d1098df81ce9c68ec558e6c3a0e7086
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a306ea0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 16 23:43:34 2014 +0200
dialog: allocate buffer for new request after updating CSeq value
- new buffer is higher than the old one -- situation only when dialog is
taking care of updating cseq downstream (e.g., after authentication)
---
modules/dialog/dlg_cseq.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/dialog/dlg_cseq.c b/modules/dialog/dlg_cseq.c
index 24a23f4..994975d 100644
--- a/modules/dialog/dlg_cseq.c
+++ b/modules/dialog/dlg_cseq.c
@@ -303,6 +303,11 @@ int dlg_cseq_msg_sent(void *data)
- get_cseq(&msg)->number.len;
/* replace old msg content */
+ obuf->s = pkg_malloc((tbuf_len+1)*sizeof(char));
+ if(obuf->s==NULL) {
+ LM_ERR("not enough memory for new message\n");
+ goto done;
+ }
memcpy(obuf->s, tbuf, tbuf_len);
obuf->s[tbuf_len] = 0;
obuf->len = tbuf_len;