Skip to content

Commit

Permalink
GUACAMOLE-377: Correct return value confusion in handling of timeout …
Browse files Browse the repository at this point in the history
…vs. general failure of WaitForMultipleObjects().

The conversion of WAIT_FAILED to a signed int and back may cause the
value of result to not actually match the value of the WAIT_FAILED macro
due to the difference in size and sign extension during conversion.
  • Loading branch information
mike-jumper committed Aug 30, 2024
1 parent bb9d23f commit d596820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocols/rdp/rdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static int rdp_guac_client_wait_for_messages(guac_client* client,
GUAC_RDP_MAX_FILE_DESCRIPTORS);

/* Wait for data and construct a reasonable frame */
int result = WaitForMultipleObjects(num_handles, handles, FALSE,
DWORD result = WaitForMultipleObjects(num_handles, handles, FALSE,
timeout_msecs);

/* Translate WaitForMultipleObjects() return values */
Expand Down

0 comments on commit d596820

Please sign in to comment.