tendermint/common
Emmanuel T Odeke 97bdad8262 common: NewBitArray never crashes on negatives (#170)
Fixes #169
Fixes https://github.com/tendermint/tendermint/issues/1322

The previous code was very trusting assuming that
rational actors will use this code. However, Byzantine
actors don't care and in the case of the linked issue
negative lengths can be sent to this code unfettered
having been received from a peer.

This code is essentially just a sign change from
`==`
to
`<=`

and we've gutted out that attack by being more defensive.
2018-03-22 19:36:24 -04:00
..
LICENSE move all files to common/ to begin repo merge 2017-04-18 16:33:22 -04:00
array.go move all files to common/ to begin repo merge 2017-04-18 16:33:22 -04:00
async.go move all files to common/ to begin repo merge 2017-04-18 16:33:22 -04:00
bit_array.go common: NewBitArray never crashes on negatives (#170) 2018-03-22 19:36:24 -04:00
bit_array_test.go common: NewBitArray never crashes on negatives (#170) 2018-03-22 19:36:24 -04:00
bytes.go cmn: fix HexBytes.MarshalJSON 2018-01-02 11:05:53 -05:00
bytes_test.go cmn: fix HexBytes.MarshalJSON 2018-01-02 11:05:53 -05:00
byteslice.go common: Fingerprint comment 2017-09-20 02:49:51 -04:00
cmap.go Make iterating over keys possible (#63) 2017-11-04 00:06:20 -05:00
cmap_test.go use assert.Contains in cmap_test 2017-11-04 00:10:59 -05:00
colors.go move all files to common/ to begin repo merge 2017-04-18 16:33:22 -04:00
date.go changelog and PR changes 2017-06-20 17:18:55 -04:00
date_test.go changelog and PR changes 2017-06-20 17:18:55 -04:00
errors.go Deprecated Panic* 2017-12-09 09:26:03 -08:00
heap.go Add PushBytes to Heap 2017-12-10 14:23:27 -08:00
int.go IntInSlice and StringInSlice functions 2017-11-29 12:18:03 -06:00
int_test.go IntInSlice and StringInSlice functions 2017-11-29 12:18:03 -06:00
io.go move all files to common/ to begin repo merge 2017-04-18 16:33:22 -04:00
kvpair.go Remove Bytes, just use []byte; Use protobuf for KVPair/KI64Pair 2017-12-26 04:40:35 -08:00
math.go move all files to common/ to begin repo merge 2017-04-18 16:33:22 -04:00
net.go common: ProtocolAndAddress 2017-07-19 15:02:04 -04:00
net_test.go common: ProtocolAndAddress 2017-07-19 15:02:04 -04:00
os.go use os.Process#Kill (Fixes #73) 2017-11-04 08:14:47 -05:00
os_test.go make GoPath a function 2017-10-25 11:01:52 +04:00
random.go cmn: fix race condition in prng 2017-12-21 10:02:25 -05:00
random_test.go common: Rand* warnings about cryptographic unsafety 2017-12-15 22:41:36 -07:00
repeat_timer.go minor nit 2018-02-12 19:12:24 -05:00
repeat_timer_test.go Fix RepeatTimer memory leak (#137) 2018-02-09 13:31:32 +04:00
service.go add Quit method to Service interface 2018-02-12 11:40:42 +04:00
service_test.go remove bool from Service#Reset 2017-11-27 23:42:36 -06:00
string.go common: IsHex should be able to handle 0X prefixed strings 2018-02-02 23:41:24 -07:00
string_test.go common: IsHex should be able to handle 0X prefixed strings 2018-02-02 23:41:24 -07:00
throttle_timer.go Revert "Refactor throttle timer" 2017-12-19 16:23:20 -06:00
throttle_timer_test.go Revert "Refactor throttle timer" 2017-12-19 16:23:20 -06:00
types.pb.go Switch to dep from glide (#155) 2018-02-27 16:01:49 +04:00
types.proto Remove Bytes, just use []byte; Use protobuf for KVPair/KI64Pair 2017-12-26 04:40:35 -08:00
word.go move all files to common/ to begin repo merge 2017-04-18 16:33:22 -04:00