Skip to content

Commit

Permalink
fix an assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed May 23, 2024
1 parent 7c8a37b commit 256f52a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ read_limits(const uint8_t **pp, const uint8_t *ep, struct limits *lim,
}
uint64_t typemax_shifted = typemax >> shift;
assert(typemax == (uint64_t)typemax_shifted << shift);
assert(typemax_shifted <= UINT32_MAX + 1);
assert(typemax_shifted <= (uint64_t)UINT32_MAX + 1);
if (has_max) {
if (typemax_shifted < lim->max) {
ret = EOVERFLOW;
Expand Down

0 comments on commit 256f52a

Please sign in to comment.