Skip to content

Commit

Permalink
Merge pull request #146 from jowagner/patch-2
Browse files Browse the repository at this point in the history
Correct overflow protection
  • Loading branch information
AltraMayor committed Sep 1, 2020
2 parents ba0078e + 67337d7 commit 10cc50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ uint64_t probe_device_max_blocks(struct device *dev)
/* Make sure that there is no overflow in the formula below.
* The number 10 is arbitrary here, that is, it's not tight.
*/
assert(MAX_N_BLOCK_ORDER < sizeof(int) - 10);
assert(MAX_N_BLOCK_ORDER < 8*sizeof(int) - 10);

return
/* find_cache_size() */
Expand Down

0 comments on commit 10cc50f

Please sign in to comment.