aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-04-28 13:36:40 +0200
committerHarald Welte <laforge@gnumonks.org>2018-04-28 13:36:40 +0200
commitef1900151703e4d6b16cb434c3ae688fd7fddc55 (patch)
treef3ee53469a66547b91df5ec4a5017a4f41323265
parentdf0ad6c1a4e23a96428e435af7ba54c2f367546b (diff)
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
-rw-r--r--src/osmux.c1
1 files changed, 1 insertions, 0 deletions
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;