Commit b1ceb30
committed
mapi_lib: reorder time checks in
``if (*send_time < submit_time)`` logically implies
``if (nttime_to_unix(*send_time) < nttime_to_unix(submit_time))``, i.e.
``if (nttime_to_unix(*send_time) < nttime_to_unix(unix_to_nttime(cur_time))``, i.e.
``if (nttime_to_unix(*send_time) < cur_time``. But because the
time conversion functions have recently gained clamping, these conditions no
longer hold. Reorder the is-less-than test after time conversions to nudge
cov-scan.
CID 1596023: (#1 of 1): Overflowed return value (INTEGER_OVERFLOW)
5. return_overflow: rop_util_nttime_to_unix(*send_time) - cur_time,
which might have overflowed, is returned from the function.
Fixes: gromox-2.44-52-g438424e5fprops_to_defer_interval
1 parent d57e772 commit b1ceb30
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
254 | | - | |
255 | 257 | | |
256 | 258 | | |
257 | | - | |
| 259 | + | |
| 260 | + | |
258 | 261 | | |
259 | | - | |
| 262 | + | |
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
| |||
0 commit comments