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

Restrict path to be an AbstractString in lbt_forward() #48567

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

staticfloat
Copy link
Sponsor Member

Some users tried to pass a dlopen() handle into lbt_forward() which sadly works just fine, despite ccall() declaring its first argument as being a Cstring. I guess it's trivial to convert a Ptr{Cvoid} into a Cstring, so this just goes through.

To protect against this, restrict path to be an AbstractString.

X-ref: JuliaLinearAlgebra/libblastrampoline#102

Some users tried to pass a `dlopen()` handle into `lbt_forward()` which sadly works just fine, despite `ccall()` declaring its first argument as being a `Cstring`.  I guess it's trivial to convert a `Ptr{Cvoid}` into a `Cstring`, so this just goes through.

To protect against this, restrict `path` to be an `AbstractString`.
@ViralBShah ViralBShah added the backport 1.9 Change should be backported to release-1.9 label Feb 7, 2023
@staticfloat staticfloat merged commit 2c619b7 into master Feb 7, 2023
@staticfloat staticfloat deleted the sf/lbt_path_protection branch February 7, 2023 12:45
@KristofferC KristofferC mentioned this pull request Feb 20, 2023
50 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Mar 6, 2023
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.

None yet

3 participants