Fwd: Possible Buffer Overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

While creating an new project based on PJSIP in an extremely RAM-limited
target, I decreased the amount of players, recorders and conference ports
in this way:

#define PJSUA_MAX_PLAYERS 4
#define PJSUA_MAX_RECORDERS 4
#define PJSUA_MAX_CONF_PORTS (PJSUA_MAX_CALLS+2*PJSUA_MAX_PLAYERS)

And my project started SEGFAULTing. I need to use the hardware at 44.1kHz
and so the packets must be 10ms in size. But the ring and ringback ports
where configured for an frame size of 1764(441*2*sizeof(pj_uint16)). When
the conf_switch asks the ring port for an frame, it passes an buffer of
size 1500 (MTU) to the ring port. And then the ring port overwrites some
memory.

The problem is triggered only when I decrease the number of
players/recorders/ports. I have looked superficially at the conf_switch.c
file but couldn't find out why it doesn't happen every time as it seems to
me that the buffer is always of the same size.

The problem happens if I change the value of PJSUA_DEFAULT_CLOCK_RATE to
44100 or if I use the "--snd-clock-rate=44100 --clock-rate=44100"
parameters on command line.

Was this expected(like: You shouldn't use this rate this way) or is there
really something funny going on here?

Thanks in advance,
Fernando
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130319/6346fdb2/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux