Skip to content

Conversation

@dmitigr
Copy link

@dmitigr dmitigr commented May 5, 2023

Add trailing curly brace to _rs_init() definition.

Add trailing curly brace to _rs_init() definition.
@tgauth tgauth merged commit 41e1711 into PowerShell:latestw_all May 8, 2023
@tgauth
Copy link
Collaborator

tgauth commented May 8, 2023

good find - thanks @dmitigr!

@dmitigr dmitigr deleted the dmitigr-fix-1 branch May 16, 2023 09:23
@d5UtQvp8QQU9
Copy link

Something smells fishy here. I'm a total noob to this project, but what I know are 3 things:

  1. In the original implementation, _rs_init() spans to the call of chacha_ivsetup() and does something meaningful with buf. Here, _rs_init() does absolutely nothing.

  2. The declared functions static void getrnd(u_char *s, size_t len) are never called.

  3. Because _rs_allocate() is only present in the #else path of #ifdef WINDOWS inside of getrnd(), it is never called for !WINDOWS (see 2.), but a call to it is not even compiled in for WINDOWS. So rs can't be something else than NULL.

I'm not saying this is wrong, but it looks suspicious.

This project is broken without WITH_OPENSSL. So why not get rid of this pretend-to-be-code and debloat the project ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants