[vlc-commits] mpeg_audio: signed integer overflow
Rémi Denis-Courmont
git at videolan.org
Sat Apr 26 10:23:32 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 26 11:22:51 2014 +0300| [407acf38d11420f38b0efd70954e53a82ff9a5b3] | committer: Rémi Denis-Courmont
mpeg_audio: signed integer overflow
(with (uint8_t)255 << (int)24)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=407acf38d11420f38b0efd70954e53a82ff9a5b3
---
modules/codec/mpeg_audio.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c
index e67abeb..c9f7bac 100644
--- a/modules/codec/mpeg_audio.c
+++ b/modules/codec/mpeg_audio.c
@@ -264,8 +264,7 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
}
/* Build frame header */
- i_header = (p_header[0]<<24)|(p_header[1]<<16)|(p_header[2]<<8)
- |p_header[3];
+ i_header = GetDWBE(p_header);
/* Check if frame is valid and get frame info */
p_sys->i_frame_size = SyncInfo( i_header,
@@ -324,8 +323,7 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
unsigned int i_next_layer;
/* Build frame header */
- i_header = (p_header[0]<<24)|(p_header[1]<<16)|(p_header[2]<<8)
- |p_header[3];
+ i_header = GetDWBE(p_header);
i_next_frame_size = SyncInfo( i_header,
&i_next_channels,
More information about the vlc-commits
mailing list