Commit 1ae1768
committed
vcomp/cmpto_j2k: check val dst type upper bound
check maximal value to fit the destination target type
Note: the `nextafter(..., -INF)` is used to represent a value of type
max that is also representable by double. Depending on the rounding
mode, eg. `(double) LLONG_MAX` may round up - in this case
9223372036854775807 becomes ..808.
improves <#473>1 parent 1735e6a commit 1ae1768
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | 55 | | |
57 | | - | |
58 | 56 | | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
740 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
741 | 744 | | |
742 | 745 | | |
743 | 746 | | |
| |||
0 commit comments