GUACAMOLE-1059: Log array boundary violation for sound formats.
This commit is contained in:
parent
234f5aff1a
commit
ff34146f57
@ -296,12 +296,19 @@ void guac_rdpsnd_wave_info_handler(guac_rdp_common_svc* svc,
|
|||||||
rdpsnd->next_pdu_is_wave = TRUE;
|
rdpsnd->next_pdu_is_wave = TRUE;
|
||||||
|
|
||||||
/* Reset audio stream if format has changed */
|
/* Reset audio stream if format has changed */
|
||||||
if (audio != NULL && format < sizeof(rdpsnd->formats))
|
if (audio != NULL) {
|
||||||
|
if (format < sizeof(rdpsnd->formats))
|
||||||
guac_audio_stream_reset(audio, NULL,
|
guac_audio_stream_reset(audio, NULL,
|
||||||
rdpsnd->formats[format].rate,
|
rdpsnd->formats[format].rate,
|
||||||
rdpsnd->formats[format].channels,
|
rdpsnd->formats[format].channels,
|
||||||
rdpsnd->formats[format].bps);
|
rdpsnd->formats[format].bps);
|
||||||
|
|
||||||
|
else
|
||||||
|
guac_client_log(svc->client, GUAC_LOG_WARNING, "RDP server "
|
||||||
|
"attempted to specify an invalid audio format. Sound may "
|
||||||
|
"not work as expected.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guac_rdpsnd_wave_handler(guac_rdp_common_svc* svc,
|
void guac_rdpsnd_wave_handler(guac_rdp_common_svc* svc,
|
||||||
|
Loading…
Reference in New Issue
Block a user