aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2022-09-09 14:59:53 +0200
committerMark Brown <[email protected]>2022-09-09 22:27:10 +0100
commit8d8e16592022c9650df8aedfe6552ed478d7135b (patch)
tree3c556b1808d21ec2cd299b632375e920897d1f12 /lib/test_fortify/write_overflow-strncpy-src.c
parent08865c2150392f67769a9d6e0b02800be226a990 (diff)
regulator: core: Prevent integer underflow
By using a ratio of delay to poll_enabled_time that is not integer time_remaining underflows and does not exit the loop as expected. As delay could be derived from DT and poll_enabled_time is defined in the driver this can easily happen. Use a signed iterator to make sure that the loop exits once the remaining time is negative. Signed-off-by: Patrick Rudolph <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions