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

Code sonar cleanup #7782

Merged
merged 4 commits into from
Jul 30, 2024
Merged

Code sonar cleanup #7782

merged 4 commits into from
Jul 30, 2024

Conversation

bandi13
Copy link
Contributor

@bandi13 bandi13 commented Jul 23, 2024

No description provided.

src/ssl_load.c Outdated Show resolved Hide resolved
@bandi13 bandi13 force-pushed the CodeSonarCleanup branch 3 times, most recently from bf96af6 to f58c0cb Compare July 23, 2024 21:50
@bandi13 bandi13 force-pushed the CodeSonarCleanup branch from f58c0cb to 6175778 Compare July 23, 2024 21:59
src/ssl_load.c Outdated Show resolved Hide resolved
src/ssl_load.c Outdated Show resolved Hide resolved
@bandi13
Copy link
Contributor Author

bandi13 commented Jul 24, 2024

Retest this please

@@ -917,6 +917,7 @@ typedef struct w64wrapper {
WOLFSSL_API int wc_strncasecmp(const char *s1, const char *s2, size_t n);
#endif

WOLFSSL_API char* wc_strdup(const char *src, int memType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be public... Please make WOLFSSL_LOCAL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -1177,6 +1177,21 @@ int wc_strncasecmp(const char *s1, const char *s2, size_t n)
}
#endif /* USE_WOLF_STRNCASECMP */

char* wc_strdup(const char *src, int memType) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be always exposed... It needs to be conditional based on #ifdef XGETENV or possibly another macro like USE_WOLF_STRDUP. I'd like to see this strdup function perfectly match the stdlib strdup API. Also consider fixing #define BUF_strdup strdup to use it...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bandi13 bandi13 force-pushed the CodeSonarCleanup branch from bbeb246 to 87386f2 Compare July 26, 2024 16:13
@bandi13 bandi13 removed their assignment Jul 30, 2024
@bandi13 bandi13 requested a review from dgarske July 30, 2024 13:36
@dgarske dgarske merged commit 50d60bf into wolfSSL:master Jul 30, 2024
121 checks passed
@bandi13 bandi13 deleted the CodeSonarCleanup branch August 5, 2024 21:53
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