From ef1900151703e4d6b16cb434c3ae688fd7fddc55 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 28 Apr 2018 13:36:40 +0200 Subject: osmux: Fix use of uninitialized memory in osmux_out_handle In Change-Id: I2efed6d726a1b8e77e686c7a5fe1940d3f4901a7 we're adding a new member to 'struct osmux_out_handle' which is not initialized. Rather than initializing this single new member, let's do a memset() over the entire osmux_out_handle at the beginnign of osmux_xfrm_output_init(). Change-Id: I751e9414c6de2413a9f977e5ae5655ebfd114f45 Closes: OS#3219 --- src/osmux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osmux.c b/src/osmux.c index 872588d..46170ba 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -1001,6 +1001,7 @@ osmux_tx_sched(struct llist_head *list, void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) { + memset(h, 0, sizeof(*h)); h->rtp_seq = (uint16_t)random(); h->rtp_timestamp = (uint32_t)random(); h->rtp_ssrc = rtp_ssrc; -- cgit v1.2.3