necouchman commented on a change in pull request #274: URL: https://github.com/apache/guacamole-server/pull/274#discussion_r420397115
########## File path: src/protocols/rdp/plugins/guacai/guacai-messages.c ########## @@ -48,8 +52,9 @@ static void guac_rdp_ai_read_format(wStream* stream, Stream_Read_UINT16(stream, format->bps); /* wBitsPerSample */ Stream_Read_UINT16(stream, format->data_size); /* cbSize */ - /* Read arbitrary data block (if applicable) */ - if (format->data_size != 0) { + /* Read arbitrary data block (if applicable) and data is available. */ + if (format->data_size != 0 + && Stream_GetRemainingLength(stream) >= format->data_size) { Review comment: Well, my initial try didn't work so well - it just bails out and doesn't process any sound input :-). Apparently I need to try something else... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org