Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-1437: Remove remaining references to Stream_GetPointer. #557

Draft
wants to merge 1 commit into
base: patch
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading