summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-samsung/reset_source.c
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2021-11-29 08:14:54 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-12-07 10:12:47 +0100
commit3a726d01792bdd03eb16b74f1565ce30995abb75 (patch)
tree7fc4bae55583253be71220b622de2c4460071008 /arch/arm/mach-samsung/reset_source.c
parentf2dd8896846757829fb3033f41b89be3fc037d78 (diff)
downloadbarebox-3a726d01792bdd03eb16b74f1565ce30995abb75.tar.gz
barebox-3a726d01792bdd03eb16b74f1565ce30995abb75.tar.xz
fs: /dev/mem: handle copy at offset 0 correctly
Despite that /dev/mem has a size of 0, the check preventing out-of-bounds access works for /dev/mem as well, because of unsigned wrap around. Corner case is when offset is zero. There will be no wrap around and count = min(count, 0 - 0) = 0 Leading to unexpected behavior with e.g. memcmp -s /dev/mem 0 on systems without MMU. Fix this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20211129071454.2014315-1-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-samsung/reset_source.c')
0 files changed, 0 insertions, 0 deletions