GUACAMOLE-1059: Check array boundary for sound formats.

This commit is contained in:
Nick Couchman 2020-05-16 21:12:53 -04:00
parent 0bf65ce8b0
commit 234f5aff1a

View File

@ -296,7 +296,7 @@ void guac_rdpsnd_wave_info_handler(guac_rdp_common_svc* svc,
rdpsnd->next_pdu_is_wave = TRUE;
/* Reset audio stream if format has changed */
if (audio != NULL)
if (audio != NULL && format < sizeof(rdpsnd->formats))
guac_audio_stream_reset(audio, NULL,
rdpsnd->formats[format].rate,
rdpsnd->formats[format].channels,