[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] overflow in move_to_unaligned16
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2013-02-27 17:33:46
Message-ID: CAK1hOcP0RrY_L=W9OvURGC6Uhr3=ns1EJ8S68EkopXyoDt-hkQ () mail ! gmail ! com
[Download RAW message or body]
On Wed, Feb 27, 2013 at 6:10 PM, Leonid Lisovskiy <lly.dev@gmail.com> wrote:
> Seems to be the put_unaligned_le32/put_unaligned_be32 from
> archival/libarchive/decompress_unxz.c must be fixed in follow of
> move_to_unaligned16 patch:
>
> diff --git a/archival/libarchive/decompress_unxz.c
> b/archival/libarchive/decompress_unxz.c
> --- a/archival/libarchive/decompress_unxz.c
> +++ b/archival/libarchive/decompress_unxz.c
> @@ -30,8 +30,8 @@ static uint32_t xz_crc32(const uint8_t *
> /* We use arch-optimized unaligned accessors */
> #define get_unaligned_le32(buf) ({ uint32_t v;
> move_from_unaligned32(v, buf); SWAP_LE32(v); })
> #define get_unaligned_be32(buf) ({ uint32_t v;
> move_from_unaligned32(v, buf); SWAP_BE32(v); })
> -#define put_unaligned_le32(val, buf) move_to_unaligned16(buf, SWAP_LE32(val))
> -#define put_unaligned_be32(val, buf) move_to_unaligned16(buf, SWAP_BE32(val))
> +#define put_unaligned_le32(val, buf) move_to_unaligned32(buf, SWAP_LE32(val))
> +#define put_unaligned_be32(val, buf) move_to_unaligned32(buf, SWAP_BE32(val))
>
> #include "unxz/xz_dec_bcj.c"
> #include "unxz/xz_dec_lzma2.c"
Applied, thanks!
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic