Skip to content

Commit

Permalink
Merge pull request tlsa#179 from a2mpt/signed-integer-limit
Browse files Browse the repository at this point in the history
Load: Fix signed integer limit error.
  • Loading branch information
tlsa committed Jan 27, 2022
2 parents 5206ece + 2e233c6 commit 99c4cb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/load.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ static cyaml_err_t cyaml__read_int(
return CYAML_ERR_INVALID_DATA_SIZE;
}

max = (INT64_MAX >> ((8 - schema->data_size) * 8)) / 2;
max = (int64_t)((UINT64_MAX >> ((8 - schema->data_size) * 8)) / 2);
min = (-max) - 1;

errno = 0;
Expand Down

0 comments on commit 99c4cb5

Please sign in to comment.