Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Null byte in shell command
commit_header = "commit #{length}\000" + body
# ...
puts 'Success'
# `git hash-object -t commit --stdin -w "#{commit}"`
Process.exec('git hash-object -t commit --stdin -w', commit)
# miner.rb:51:in `exec': string contains null byte (ArgumentError)
# from miner.rb:51:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.