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

Possible big endian breakage in 2.4.1 #7436

Closed
ondrejholy opened this issue Nov 12, 2021 · 2 comments
Closed

Possible big endian breakage in 2.4.1 #7436

ondrejholy opened this issue Nov 12, 2021 · 2 comments

Comments

@ondrejholy
Copy link
Contributor

Describe the bug
On the stable-2.0 branch I see the following build warning:

/FreeRDP/libfreerdp/core/gateway/rdg.c: In function ‘rdg_handle_ntlm_challenge’:
/FreeRDP/libfreerdp/core/gateway/rdg.c:1218:65: warning: passing argument 4 of ‘crypto_base64_decode’ from incompatible pointer type [-Wincompatible-pointer-types]
 1218 |         crypto_base64_decode(token64, (int)len, &ntlmTokenData, &ntlmTokenLength);
      |                                                                 ^~~~~~~~~~~~~~~~
      |                                                                 |
      |                                                                 size_t * {aka long unsigned int *}
In file included from /FreeRDP/include/freerdp/crypto/tls.h:23,
                 from /FreeRDP/libfreerdp/core/gateway/rdg.h:33,
                 from /FreeRDP/libfreerdp/core/gateway/rdg.c:36:
/FreeRDP/include/freerdp/crypto/crypto.h:111:52: note: expected ‘int *’ but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
  111 |                                               int* res_length);
      |                                               ~~~~~^~~~~~~~~~

and the same for rpc_ncacn_http_recv_in_channel_response and rpc_ncacn_http_recv_out_channel_response. Although, it seems to be safe for little endian, I am pretty sure this might be a problem on big endian...

Environment:

  • OS: Linux
  • Version/Distribution: Fedora 35
  • Architecture: amd64

Additional context
This was introduced by #7366 resp. f0a0683.

This is not a problem on master as crypto_base64_decode really uses size_t * there.

akallabeth added a commit to akallabeth/FreeRDP that referenced this issue Nov 12, 2021
@akallabeth akallabeth added this to the stable-next milestone Nov 12, 2021
akallabeth added a commit to akallabeth/FreeRDP that referenced this issue Nov 12, 2021
akallabeth added a commit that referenced this issue Nov 12, 2021
@akallabeth
Copy link
Member

@ondrejholy all occurrences should be fixed now, closing.

@ondrejholy
Copy link
Contributor Author

ondrejholy commented Nov 16, 2021

I've just verified that, thanks.

@akallabeth akallabeth modified the milestones: 2.4.1, stable-next Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants