tpu: Fix msgb-write-beyond-tailroom in TPU_DEBUG

We need to make sure to allocte sufficient space to include
the 32bit frame number at the start of the TPU_DEBUG msgb.

Change-Id: Ifb3ce6f91131fc361b20c3b3fe5ebc7079633ac3
This commit is contained in:
Harald Welte 2020-10-24 12:36:11 +02:00
parent 46cf9b1043
commit 9785a92d66
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ static void tpu_debug(void)
{
uint16_t *tpu_base = (uint16_t *)BASE_ADDR_TPU_RAM;
unsigned int tpu_size = tpu_ptr - tpu_base;
struct msgb *msg = sercomm_alloc_msgb(tpu_size*2);
struct msgb *msg = sercomm_alloc_msgb(sizeof(uint32_t) + tpu_size*2);
uint16_t *data;
uint32_t *fn;
uint16_t reg;