From: <st...@us...> - 2003-06-12 14:54:37
|
Update of /cvsroot/iaxclient/iaxclient/lib/libiax2/src In directory sc8-pr-cvs1:/tmp/cvs-serv20484 Modified Files: iax.c Log Message: fix for memory overwriting bug on PPC due to opposite stack direction. Index: iax.c =================================================================== RCS file: /cvsroot/iaxclient/iaxclient/lib/libiax2/src/iax.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- iax.c 11 Jun 2003 20:13:35 -0000 1.4 +++ iax.c 12 Jun 2003 14:54:33 -0000 1.5 @@ -613,8 +613,7 @@ or delayed, with retransmission */ struct ast_iax2_full_hdr *fh; struct ast_iax2_mini_hdr *mh; - unsigned char buffer[4096]; /* Buffer -- must preceed fr2 */ - struct iax_frame fr2; + double buffer[4096]; /* Buffer -- we use this for a frame later, double might ensure proper alignment? */ struct iax_frame *fr; int res; int sendmini=0; @@ -646,7 +645,7 @@ } /* Allocate an iax_frame */ if (now) { - fr = &fr2; + fr = (struct iax_frame *)&buffer; } else fr = iax_frame_new(DIRECTION_OUTGRESS, f->datalen); if (!fr) { |