forked from Mirrors/freeswitch
fix mem issue
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3674 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ae9c58f1dd
commit
6e740d7d9d
@ -600,7 +600,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_serialize(switch_event_t *event, ch
|
|||||||
{
|
{
|
||||||
switch_size_t len = 0;
|
switch_size_t len = 0;
|
||||||
switch_event_header_t *hp;
|
switch_event_header_t *hp;
|
||||||
switch_size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1024, new_len = 0;
|
switch_size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1536, new_len = 0;
|
||||||
char *buf;
|
char *buf;
|
||||||
char *encode_buf = NULL; /* used for url encoding of variables to make sure unsafe things stay out of the serialzed copy */
|
char *encode_buf = NULL; /* used for url encoding of variables to make sure unsafe things stay out of the serialzed copy */
|
||||||
|
|
||||||
@ -650,7 +650,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_serialize(switch_event_t *event, ch
|
|||||||
/* handle any bad things in the string like newlines : etc that screw up the serialized format */
|
/* handle any bad things in the string like newlines : etc that screw up the serialized format */
|
||||||
switch_url_encode(hp->value, encode_buf, encode_len - 1);
|
switch_url_encode(hp->value, encode_buf, encode_len - 1);
|
||||||
|
|
||||||
llen = strlen(hp->name) + strlen(encode_buf) + 2;
|
llen = strlen(hp->name) + strlen(encode_buf) + 8;
|
||||||
|
|
||||||
if ((len + llen) > dlen) {
|
if ((len + llen) > dlen) {
|
||||||
char *m;
|
char *m;
|
||||||
|
Loading…
Reference in New Issue
Block a user