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
from

Conversation

Projects
None yet
7 participants
@Eugenpaul
Copy link

Eugenpaul commented Jul 21, 2017

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

This comment has been minimized.

Copy link

marekkirejczyk commented Jul 23, 2017

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

This comment has been minimized.

Copy link

se3000 commented Oct 12, 2017

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

@hswick

This comment has been minimized.

Copy link

hswick commented Feb 6, 2018

plz merge

@mtomov

This comment has been minimized.

Copy link

mtomov commented Feb 20, 2018

please! Thank you!

@d00rsfan

This comment has been minimized.

Copy link

d00rsfan commented Jul 28, 2018

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

This comment has been minimized.

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

gem-config: add digest-sha3
`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

@smaximov smaximov referenced this pull request Jan 18, 2019

Open

gem-config: add digest-sha3 #54265

2 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment