GUACAMOLE-1059: Sound format index should be checked against maximum number of formats, not byte size of array.
This commit is contained in:
parent
8d895f13c7
commit
4184a52c98
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user