~> 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
Since https://github.com/kfogel/OneTime/commit/76c46de2efdd651846758e419f2ef35743b5968a pulling random data from
/dev/random
and using it as an directed byonetime --pad-help
can result inonetime
blowing up, as discussed in https://github.com/Homebrew/homebrew-core/pull/7258 with a random file that'll produce a failure in https://github.com/Homebrew/homebrew-core/pull/7258#issuecomment-263068825.Stable and 2.0-beta13, 2.0-beta14 are unaffected, as far as I can discover from testing. Any git checkout prior to https://github.com/kfogel/OneTime/commit/76c46de2efdd651846758e419f2ef35743b5968a works fine using that known-defective
/dev/random
created file at https://github.com/Homebrew/homebrew-core/pull/7258#issuecomment-263068825.