Opened 10 years ago

Last modified 4 years ago

#825 new defect

Use of uninitialized data in bitstream.h:888 (get_vlc2) GET_VLC macro - H.264

Reported by: haakon.riiser@… Owned by: mans@…
Priority: normal Component: libavcodec
Version: unspecified Severity: normal
Keywords: Cc: xjirayuthx@…
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

When decoding H.264, ffmpeg apparently uses uninitialized data in some cases. This particular bug report is about the table pointer in get_vlc2() in bitstream.h (line 888 in the current svn revision):

GET_VLC(code, re, s, table, bits, max_depth)

By expanding this macro, I found that the lines 821 and 822 in bitstream.h are responsible for valgrind's uninitialized warning, that is:

code = table[index][0];\
n = table[index][1];\

Steps to reproduce this error:

  1. Download the attached video clip (error.avi):
  2. Run valgrind ffplay error.avi 2>&1 | grep -B1 bitstream.h

The result on my system is:

==5872== Use of uninitialised value of size 4
==5872== at 0x427B9EE: decode_residual (bitstream.h:888)
--
==5872== Use of uninitialised value of size 4
==5872== at 0x427B9F3: decode_residual (bitstream.h:888)

Attachments (1)

error.avi (221.6 KB) - added by haakon.riiser@… 10 years ago.
H.264 clip that illustrates the reported bug

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by haakon.riiser@…

H.264 clip that illustrates the reported bug

comment:1 Changed 10 years ago by haakon.riiser@…

comment:2 Changed 4 years ago by xjirayuthx@…

  • Cc xjirayuthx@… added
  • op_sys changed from Linux to BSD/OS

comment:3 Changed 4 years ago by xjirayuthx@…

  • op_sys changed from BSD/OS to Linux
Note: See TracTickets for help on using tickets.