osmux: Fix buffer overflow in osmux_snprintf

When running osmux_test on my PC, the process was aborted with a "stack
smashing detected" error.

Change-Id: I8a7cc422c181c0c5712ac8976a5be5f0ad44a9c0
This commit is contained in:
Pau Espin 2017-08-14 17:19:55 +02:00
parent 6032a35be8
commit 7cca0da1cc
1 changed files with 1 additions and 1 deletions

View File

@ -847,7 +847,7 @@ void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc)
}
#define SNPRINTF_BUFFER_SIZE(ret, size, len, offset) \
size += ret; \
size -= ret; \
if (ret > len) \
ret = len; \
offset += ret; \