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
This commit is contained in:
Harald Welte 2018-04-28 13:36:40 +02:00
parent df0ad6c1a4
commit ef19001517
1 changed files with 1 additions and 0 deletions

View File

@ -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;