summaryrefslogtreecommitdiffstats
path: root/common/hush.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-10-13 10:03:16 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-04 09:31:02 +0100
commited395e4df1ed4188cbb52870b8ad4b677be4cca0 (patch)
tree91a31f1413f371211d4b963dbbb4458e48769c9e /common/hush.c
parente5b991832926599892645668791870fd17e196e3 (diff)
downloadbarebox-ed395e4df1ed4188cbb52870b8ad4b677be4cca0.tar.gz
barebox-ed395e4df1ed4188cbb52870b8ad4b677be4cca0.tar.xz
fcntl: Fix O_CREAT clashing with O_RWSIZE_8
O_CREAT and O_RWSIZE_8 are both defined as 0100. Fix this by moving the O_RWSIZE_* flags to unused bits. This bug leads to incomplete writes when the destination file is created and mem_write is involved, for example with the memcpy command: memcpy -s /some/file -d /dev/ram0 0 0 10 In this case only 8 bytes will be copied and it will be done using 8 byte accesses which may not work properly if the destination is not sufficiently aligned, i.e.: memcpy -s /some/file -d /dev/ram0 0 1 8 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'common/hush.c')
0 files changed, 0 insertions, 0 deletions