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

Regression from 2.0-beta15 release. #26

Open
DomT4 opened this issue Nov 27, 2016 · 1 comment
Open

Regression from 2.0-beta15 release. #26

DomT4 opened this issue Nov 27, 2016 · 1 comment

Comments

@DomT4
Copy link
Contributor

DomT4 commented Nov 27, 2016

Since 76c46de pulling random data from /dev/random and using it as an directed by onetime --pad-help can result in onetime blowing up, as discussed in Homebrew/homebrew-core#7258 with a random file that'll produce a failure in Homebrew/homebrew-core#7258 (comment).

~> dd if=/dev/random of=pad_data.txt bs=1024 count=1
~> ./onetime -e --pad=pad_data.txt --no-trace --config=. input.txt
Traceback (most recent call last):
  File "./onetime", line 1923, in <module>
    main()
  File "./onetime", line 1841, in main
    result = encoder.finish()
  File "./onetime", line 1493, in finish
    remainder += self.pad_sess.finish()
  File "./onetime", line 1424, in finish
    remainder += self._make_fuzz(self._tail_fuzz_length)
  File "./onetime", line 1105, in _make_fuzz
    ret_data = ret_data + chr(ord(rnd_data[i]) ^ ord(pad_data[i]))
IndexError: string index out of range

Stable and 2.0-beta13, 2.0-beta14 are unaffected, as far as I can discover from testing. Any git checkout prior to 76c46de works fine using that known-defective /dev/random created file at Homebrew/homebrew-core#7258 (comment).

@ilovezfs
Copy link

ilovezfs commented Feb 6, 2017

Ping on this ... any chance of getting it fixed?

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

No branches or pull requests

2 participants