Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv31641/channels

Modified Files:
        chan_iax2.c 
Log Message:
don't call alloca() or alloca()-using functions in parameter lists (bug #4487)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.305
retrieving revision 1.306
diff -u -d -r1.305 -r1.306
--- chan_iax2.c 9 Jun 2005 19:34:12 -0000       1.305
+++ chan_iax2.c 9 Jun 2005 20:55:07 -0000       1.306
@@ -2854,7 +2854,7 @@
 static int iax2_call(struct ast_channel *c, char *dest, int timeout)
 {
        struct sockaddr_in sin;
-       char *l=NULL, *n=NULL;
+       char *l=NULL, *n=NULL, *tmpstr;
        struct iax_ie_data ied;
        char *defaultrdest = "s";
        unsigned short callno = PTR_TO_CALLNO(c->tech_pvt);
@@ -2870,7 +2870,8 @@
        cai.encmethods = iax2_encryption;
 
        memset(&pds, 0, sizeof(pds));
-       parse_dial_string(ast_strdupa(dest), &pds);
+       tmpstr = ast_strdupa(dest);
+       parse_dial_string(tmpstr, &pds);
 
        if (!pds.exten)
                pds.exten = defaultrdest;
@@ -7651,9 +7652,11 @@
        int capability = iax2_capability;
        struct parsed_dial_string pds;
        struct create_addr_info cai;
+       char *tmpstr;
 
        memset(&pds, 0, sizeof(pds));
-       parse_dial_string(ast_strdupa(data), &pds);
+       tmpstr = ast_strdupa(data);
+       parse_dial_string(tmpstr, &pds);
 
        memset(&cai, 0, sizeof(cai));
 
@@ -8528,6 +8531,7 @@
        struct iax_ie_data ied;
        struct create_addr_info cai;
        struct parsed_dial_string pds;
+       char *tmpstr;
 
        for (x=0; x<IAX_MAX_CALLS; x++) {
                /* Look for an *exact match* call.  Once a call is negotiated, 
it can only
@@ -8545,7 +8549,8 @@
        memset(&ied, 0, sizeof(ied));
        memset(&pds, 0, sizeof(pds));
 
-       parse_dial_string(ast_strdupa(data), &pds);
+       tmpstr = ast_strdupa(data);
+       parse_dial_string(tmpstr, &pds);
 
        /* Populate our address from the given */
        if (create_addr(pds.peer, &sin, &cai))

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to