laforge
/
openbts-osmo
Archived
1
0
Fork 0

transceiver, resamp: enlarge transmit resampler output buffer

It was possible to reach a state where a resampled burst would
overrun the transmit output buffer and corrupt the global
allocated signal vectors. The result was a segmentation fault
when attempting to access heap allocated signal vectors since
the pointers were garbage.

Whether the segfault occured or not appears to depend on the
memory location of the signal vector pointers, since it does
not occur on all systems.

Double buffer size to accomodate an incoming burst plus up to
a full chunk that may be remaining from the previous resampling
operation.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
master
Thomas Tsou 11 years ago
parent 6445a3bf86
commit fa05e2e7c4
  1. 12
      public-trunk/Transceiver52M/radioIOResamp.cpp

@ -51,8 +51,16 @@ signalVector *rx_hist = 0;
signalVector *tx_vec = 0;
signalVector *rx_vec = 0;
/* High rate (device facing) buffers */
short tx_buf[INCHUNK * 2 * 2];
/*
* High rate (device facing) buffers
*
* Transmit side samples are pushed after each burst so accomodate
* a resampled burst plus up to a chunk left over from the previous
* resampling operation.
*
* Receive side samples always pulled with a fixed size.
*/
short tx_buf[INCHUNK * 2 * 4];
short rx_buf[OUTCHUNK * 2 * 2];
/*