ftmod_misdn: Reserve some space for the mISDN message header in misdn_write().
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
f2841e0280
commit
a2f3ef7460
|
@ -1280,7 +1280,7 @@ static FIO_WRITE_FUNCTION(misdn_write)
|
||||||
hh->id = MISDN_ID_ANY;
|
hh->id = MISDN_ID_ANY;
|
||||||
|
|
||||||
/* avoid buffer overflow */
|
/* avoid buffer overflow */
|
||||||
size = MIN(size, MAX_DATA_MEM);
|
size = MIN(size, MAX_DATA_MEM - MISDN_HEADER_LEN);
|
||||||
|
|
||||||
memcpy(wbuf + MISDN_HEADER_LEN, data, size);
|
memcpy(wbuf + MISDN_HEADER_LEN, data, size);
|
||||||
size += MISDN_HEADER_LEN;
|
size += MISDN_HEADER_LEN;
|
||||||
|
|
Loading…
Reference in New Issue