Skip to content

Instantly share code, notes, and snippets.

Working from home

Garrett Albright GarrettAlbright

Working from home
Block or report user

Report or block GarrettAlbright

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
GarrettAlbright / gist:8626176
Created Jan 26, 2014
Null byte in shell command
View gist:8626176
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>'
View gist:8141994
diff --git a/src/serialize.h b/src/serialize.h
index 6e952fa..3acdbc0 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -808,19 +808,6 @@ public:
iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
- void insert(iterator it, const_iterator first, const_iterator last)
- {
You can’t perform that action at this time.