journal: prevent integer overflow while validating header (#5569)
It is possible to overflow uint64_t while validating the header of a journal file. To prevent this, the addition itself is checked to be within the limits of UINT64_MAX first. To keep this readable, I have introduced two stack variables which hold the converted values during validation. (cherry picked from commit 6f94e420)
Loading
Please register or sign in to comment