Commit Graph

17 Commits

Author SHA1 Message Date
Aaron Voisine
13dfa66514 fix for potential out-of-bounds memory access
if when counting leading zeros an invalid digit is encountered with it's high-bit set, the index into b58digits_map will be out-of-bounds
2015-02-27 12:21:24 -08:00
Luke Dashjr
b6adca8ebb Bugfix: Add missing <sys/types.h> include for ssize_t 2014-11-18 23:15:36 +00:00
Luke Dashjr
2c6b7916b6 Bugfix: Use signed types so that j can go negative without underflow
In some cases, j made it negative which made (j > high) true creating a segfault condition
2014-10-26 00:26:42 +00:00
Luke Dashjr
fa132f17c4 Address most LLVM warnings 2014-09-16 07:27:55 +00:00
Luke Dashjr
6d2d2c5f0e b58tobin: Simplify zeromask calculation (fixes bug encountered when compiling with LLVM) 2014-09-16 02:39:55 +00:00
Luke Dashjr
9f0f04769f Bugfix: b58tobin: Correct zeromask for multiple-of-four binary buffer sizes 2014-08-18 20:18:49 +00:00
Luke Dashjr
62645c5114 Avoid unsafe casting 2014-08-18 20:18:22 +00:00
Luke Dashjr
2880b80cbd Modify b58tobin to return canonical size 2014-08-18 15:50:06 +00:00
Luke Dashjr
88761e9e2c b58check: Check binsz is long enough for checksum 2014-08-18 14:51:58 +00:00
Luke Dashjr
79a608586d Bugfix: Avoid confusing digit-to-number and number-to-digit mappings 2014-08-17 16:25:35 +00:00
Luke Dashjr
b3034841db b58check_enc function and docs 2014-08-17 12:23:40 +00:00
Luke Dashjr
7ecd1102d0 b58enc: Allocate buf on the stack rather than heap 2014-08-17 12:04:10 +00:00
Luke Dashjr
a2853bb766 b58enc: Accept any kind of pointer for binary data 2014-08-17 12:03:54 +00:00
Huang Le
f55613ac56 b58enc function 2014-08-17 12:00:29 +00:00
Luke Dashjr
696869093e Accept const data for b58check 2014-08-17 11:52:33 +00:00
Luke Dashjr
195033316e Rename symbols for libbase58 2014-08-17 11:52:30 +00:00
Luke Dashjr
f703579360 Initial import of code from libblkmaker 2014-08-17 11:52:26 +00:00