Skip to content

Commit

Permalink
GUACAMOLE-1437: Remove remaining references to Stream_GetPointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Oct 15, 2024
1 parent e74fa53 commit dbf84c2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/protocols/rdp/channels/rdpsnd/rdpsnd-messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void guac_rdpsnd_formats_handler(guac_rdp_common_svc* svc,
int body_size;

/* Remember position in stream */
Stream_GetPointer(input_stream, format_start);
format_start = Stream_GetPosition(input_stream);

/* Check to make sure Stream has at least 18 bytes. */
if (Stream_GetRemainingLength(input_stream) < 18) {
Expand Down Expand Up @@ -165,12 +165,6 @@ void guac_rdpsnd_formats_handler(guac_rdp_common_svc* svc,
18 + body_size);
Stream_Write(output_stream, format_start, 18 + body_size);

/*
* BEWARE that using Stream_EnsureRemainingCapacity means
* that any pointers returned via Stream_GetPointer on
* output_stream are invalid.
*/

}

/* Otherwise, log that we dropped one */
Expand All @@ -193,7 +187,7 @@ void guac_rdpsnd_formats_handler(guac_rdp_common_svc* svc,

/* Calculate size of PDU */
output_body_size = Stream_GetPosition(output_stream) - 4;
Stream_GetPointer(output_stream, output_stream_end);
output_stream_end = Stream_GetPosition(output_stream);

/* Set body size */
Stream_SetPosition(output_stream, 0x02);
Expand Down

0 comments on commit dbf84c2

Please sign in to comment.