Skip to content

Commit

Permalink
Merge pull request #1947 from chadf/fuzzing-4
Browse files Browse the repository at this point in the history
Eliminate undefined behavior of bit shifting signed int.
  • Loading branch information
orignal committed Jul 10, 2023
2 parents 5142459 + 47dc559 commit ca8ec62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libi2pd/Base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ namespace data
size_t ByteStreamToBase32 (const uint8_t * inBuf, size_t len, char * outBuf, size_t outLen)
{
size_t ret = 0, pos = 1;
int bits = 8, tmp = inBuf[0];
unsigned int bits = 8, tmp = inBuf[0];
while (ret < outLen && (bits > 0 || pos < len))
{
if (bits < 5)
Expand Down

0 comments on commit ca8ec62

Please sign in to comment.