[vlc-devel] [vlc-commits] update: use U32_AT
Rafaël Carré
funman at videolan.org
Tue Nov 18 09:31:35 CET 2014
On Mon, Nov 17, 2014 at 06:08:21PM +0100, Rémi Denis-Courmont wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 17 19:08:10 2014 +0200| [3d9656b6cf4c629c8031125f869ce3b5a1f48e2d] | committer: Rémi Denis-Courmont
>
> update: use U32_AT
>
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d9656b6cf4c629c8031125f869ce3b5a1f48e2d
> ---
>
> src/misc/update_crypto.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/misc/update_crypto.c b/src/misc/update_crypto.c
> index 417b3ec..c935b03 100644
> --- a/src/misc/update_crypto.c
> +++ b/src/misc/update_crypto.c
> @@ -257,10 +257,8 @@ static size_t parse_signature_v4_packet( signature_packet_t *p_sig,
> {
> if( p + 4 > max_pos )
> return 0;
> - i_subpacket_len = *++p << 24;
> - i_subpacket_len += *++p << 16;
> - i_subpacket_len += *++p << 8;
> - i_subpacket_len += *++p;
> + i_subpacket_len = U32_AT(p);
> + p += 4;
This code is not equivalent, so obviously untested.
> }
>
> if( *p == ISSUER_SUBPACKET )
More information about the vlc-devel
mailing list