aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorJonas Gorski <[email protected]>2023-06-29 09:14:52 +0200
committerMark Brown <[email protected]>2023-07-10 10:01:27 +0100
commit5158814cbb37bbb38344b3ecddc24ba2ed0365f2 (patch)
treea54419071865cb1ffeda20f63b0ef475b4bd5fe5 /lib/test_fortify/write_overflow-strncpy-src.c
parentc09168c9392ac9250d87d71fc5ca3156f7456ea4 (diff)
spi: bcm63xx: fix max prepend length
The command word is defined as following: /* Command */ #define SPI_CMD_COMMAND_SHIFT 0 #define SPI_CMD_DEVICE_ID_SHIFT 4 #define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8 #define SPI_CMD_ONE_BYTE_SHIFT 11 #define SPI_CMD_ONE_WIRE_SHIFT 12 If the prepend byte count field starts at bit 8, and the next defined bit is SPI_CMD_ONE_BYTE at bit 11, it can be at most 3 bits wide, and thus the max value is 7, not 15. Fixes: b17de076062a ("spi/bcm63xx: work around inability to keep CS up") Signed-off-by: Jonas Gorski <[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