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

Replace strdupa with strdup #15763

Closed

Conversation

graywolf-at-work
Copy link
Contributor

Strdupa has potential to be unsafe thanks to the possibly unbound stack
usage. It also generates warnings when compiled on musl. This commit
therefore replaces it with properly checked heap allocation using
strdup.

Fixes #15729

Strdupa has potential to be unsafe thanks to the possibly unbound stack
usage. It also generates warnings when compiled on musl. This commit
therefore replaces it with properly checked heap allocation using
strdup.

Fixes bazelbuild#15729
@graywolf-at-work
Copy link
Contributor Author

I've created a PR against master branch, however would it be possible to backport this to 5.x as well?

@Wyverald
Copy link
Member

To mark a issue as a release blocker (i.e. needs to be backported), simply reply with the comment @bazel-io flag. I've done so on #15729.

@copybara-service copybara-service bot closed this in 804b474 Jul 1, 2022
This was referenced Jul 1, 2022
ckolli5 added a commit that referenced this pull request Jul 2, 2022
Strdupa has potential to be unsafe thanks to the possibly unbound stack
usage. It also generates warnings when compiled on musl. This commit
therefore replaces it with properly checked heap allocation using
strdup.

Fixes #15729

Closes #15763.

PiperOrigin-RevId: 458440234
Change-Id: I8c8574f654295086f767b4fc4ca6fc1e59097beb

Co-authored-by: Tomas Volf <tomas.volf@showmax.com>
@ShreeM01 ShreeM01 removed the awaiting-review PR is awaiting review from an assigned reviewer label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

g++ fpermissive compilation error for strdupa on musl when buiding from source
3 participants