[asterisk-dev] Is this a new bug in libpri?

Matthew Fredrickson creslin at digium.com
Tue Feb 14 12:31:52 MST 2006


On Feb 13, 2006, at 9:33 AM, Ricardo Monteiro wrote:

>
> Well, maybe it has nothing to do with memory being overwritten. I 
> guess it could also be that memory is not being initialized as it 
> should.
>
> Can someone more acquainted with the code comment if it makes sense to 
> add the following two lines to the block of code I copied bellow? 
> Adding this line also solved the problem...
>
> libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, 
> sizeof(pri->ev.hangup.useruserinfo));
> c->useruserinfo[0] = '\0';
>
>
> block of code in q931.c function q931_receive() around line 3483
> ....
> case Q931_DISCONNECT:
> 		
> 	...
> 		pri->ev.hangup.call = c;
> 		pri->ev.hangup.aoc_units = c->aoc_units;
> 		libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, 
> sizeof(pri->ev.hangup.useruserinfo));
> 		c->useruserinfo[0] = '\0';
>
> 		if (c->alive)
> 			return Q931_RES_HAVEEVENT;
> 		else
> 			q931_hangup(pri,c,c->cause);
> 		break;
>



Looks like that was it.  Latest -trunk has the fix in it.

---
Matthew Fredrickson




More information about the asterisk-dev mailing list