Page MenuHomePhabricator

Change CSipHasher's count variable to uint8_t
ClosedPublic

Authored by PiRK on Oct 1 2021, 13:04.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC1df995312b0d: Change CSipHasher's count variable to uint8_t
Summary

SipHash technically supports arbitrarily long inputs (at least, I couldn't find a limit in the paper), but only the low 8 bits of the length matter. Because of that we should use an unsigned type to track the length (as any signed type could overflow, which is UB). uint8_t is sufficient, however.

This is a backport of core#19931

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable