From 7cca0da1cc58bd589989684147ae3a0cd5819902 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 14 Aug 2017 17:19:55 +0200 Subject: 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 --- src/osmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osmux.c b/src/osmux.c index 23a6440..2481d6a 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -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; \ -- cgit v1.2.3