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

update dependency digest-sha3 -> digest-sha3-patched #15

Merged
merged 1 commit into from
Feb 11, 2019

Conversation

mijinc0
Copy link

@mijinc0 mijinc0 commented Feb 11, 2019

依存先のgem ( digest-sha3-1.1.0 ) に問題があるようで、問題修正済みのものが別のgemとして公開されているので、そちらに依存先を差し替えています。

元のgemで同様の問題がissueに出てPRも出ているものの、マージされないままになっているようです。

phusion/digest-sha3-ruby#8

https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-Wformat_-Wformat-security

パッチ済みのgem

https://rubygems.org/gems/digest-sha3-patched

以下 gem install しようとしたときに出たエラーメッセージ

$ sudo gem install nem-ruby  
Building native extensions. This could take a while...
ERROR:  Error installing nem-ruby:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/digest-sha3-1.1.0/ext/digest
/usr/bin/ruby2.5 -r ./siteconf20190211-5806-c2wbuk.rb extconf.rb
checking for ruby/digest.h... yes
checking for rb_str_set_len()... yes
creating Makefile

current directory: /var/lib/gems/2.5.0/gems/digest-sha3-1.1.0/ext/digest
make "DESTDIR=" clean

current directory: /var/lib/gems/2.5.0/gems/digest-sha3-1.1.0/ext/digest
make "DESTDIR="
compiling KeccakF-1600-reference.c
compiling KeccakNISTInterface.c
compiling KeccakSponge.c
compiling displayIntermediateValues.c
displayIntermediateValues.c: In function 'displayText':
displayIntermediateValues.c:113:9: error: format not a string literal and no format arguments [-Werror=format-security]
         fprintf(intermediateValueFile, text);
         ^~~~~~~
cc1: some warnings being treated as errors
Makefile:242: recipe for target 'displayIntermediateValues.o' failed
make: *** [displayIntermediateValues.o] Error 1

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/2.5.0/gems/digest-sha3-1.1.0 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/digest-sha3-1.1.0/gem_make.out

@44uk 44uk merged commit bb0b85a into 44uk:master Feb 11, 2019
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.

2 participants