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

Fix 'format not a string literal and no format arguments [-Werror=format-security]' #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Eugenpaul
Copy link

I'd like to add a simple fix. The problem is that at least in Ubuntu gcc has "-Wformat-security" as a default flag, and together with "-Werror=format-security" they lead to an error if fprintf is used without format string (https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-Wformat_-Wformat-security). The issue is #7

@marekkirejczyk
Copy link

Would love to see it merged (would fix bug in our gem - EthWorks/ethereum.rb#11)

hulajesus added a commit to consenlabs/digest-sha3-ruby that referenced this pull request Sep 2, 2017
@se3000
Copy link

se3000 commented Oct 12, 2017

I'd also like to see this merged, it affects the ruby-eth gem as well.

@hswick
Copy link

hswick commented Feb 6, 2018

plz merge

@mtomov
Copy link

mtomov commented Feb 20, 2018

please! Thank you!

@d00rsfan
Copy link

This gem is abandoned.
Try to use:
https://github.com/izetex/digest-sha3-ruby
(add to Gemfile:
git "https://github.com/izetex/digest-sha3-ruby" do
gem 'digest-sha3'
end
)

@hardywu
Copy link

hardywu commented Jan 6, 2019

an easy workaround would be

bundle config build.digest-sha3 --with-cflags="-Wno-format-security"

smaximov added a commit to smaximov/nixpkgs that referenced this pull request Jan 18, 2019
`digest-sha3` is a C-extension gem which fails to build on Nix because
it uses non-literals as format strings which is forbidden by the default
Nix hardening settings. There is a pull request to fix that ([1]), but
the gem seems to be abandoned.

This PR disables the "format" hardening for `digest-sha3`.

[1]: phusion/digest-sha3-ruby#8
@mathieujobin
Copy link

why not merging this?

@cdesch
Copy link

cdesch commented Aug 5, 2021

@mathieujobin I'm not sure why

@FooBarWidget could you please take a look at this PR and provide feedback?

@cdesch
Copy link

cdesch commented Aug 31, 2021

Any update on this? This rolls into this new issue if the repo is going to be maintained: #13

@FooBarWidget

@rafa977
Copy link

rafa977 commented Nov 30, 2021

Thank you for the fix.

@q9f
Copy link

q9f commented Nov 30, 2021

I published this as keccak https://github.com/q9f/keccak.rb

@elissonmichael
Copy link

I published this as keccak https://github.com/q9f/keccak.rb

Thanks

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.