GUACAMOLE-1059: Merge correct verification of sound format index.

This commit is contained in:
Virtually Nick 2020-06-07 07:20:22 -04:00 committed by GitHub
commit d03d45fbf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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