diff options
author | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-01-15 16:38:16 +0100 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-01-24 18:14:52 +0100 |
commit | 6cc3208c51dd5fa05ad477d55ced7dc90c22527f (patch) | |
tree | 70d563ee004cadac6e1563c98c0dcd1a2b2000bb | |
parent | 06782a3532ed8f33effd928d1a9466beaa0ba64b (diff) | |
download | busybox-6cc3208c51dd5fa05ad477d55ced7dc90c22527f.tar.gz |
busybox: Don't copy 4 bytes to an uint16_t
Don't overwrite arbitrary memory by copying 4 bytes into a uint16_t in
move_to_unaligned16
Change-Id: I8389fce3e322efc664a47cefc490aa540851075d
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r-- | include/platform.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/platform.h b/include/platform.h index 128230658..f4deb30c0 100644 --- a/include/platform.h +++ b/include/platform.h @@ -228,7 +228,7 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; # define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4)) # define move_to_unaligned16(u16p, v) do { \ uint16_t __t = (v); \ - memcpy((u16p), &__t, 4); \ + memcpy((u16p), &__t, 2); \ } while (0) # define move_to_unaligned32(u32p, v) do { \ uint32_t __t = (v); \ |