aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorBen Wolsieffer <[email protected]>2024-02-06 10:10:05 -0500
committerMark Brown <[email protected]>2024-02-07 11:17:11 +0000
commit7011b51f13b391ee06708bb1f82653a2953f8cfc (patch)
tree2f00934aef3f4757bd666b8f232ed99b1f3bb863 /lib/test_fortify/write_overflow-strncpy-src.c
parent54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478 (diff)
regmap: kunit: fix raw noinc write test wrapping
The raw noinc write test places a known value in the register following the noinc register to verify that it is not disturbed by the noinc write. This test ensures this value is distinct by adding 100 to the second element of the noinc write data. The regmap registers are 16-bit, while the test value is stored in an unsigned int. Therefore, adding 100 may cause the register to wrap while the test value does not, causing the test to fail. This patch fixes this by changing val_test and val_last from unsigned int to u16. Signed-off-by: Ben Wolsieffer <[email protected]> Reported-by: Guenter Roeck <[email protected]> Closes: https://lore.kernel.org/linux-kernel/[email protected]/T/ Tested-by: Guenter Roeck <[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