Opened 17 years ago

Last modified 11 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: no Analyzed by developer: no

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@… 17 years ago.
H.264 clip that illustrates the reported bug

Download all attachments as: .zip

Change History (4)

by haakon.riiser@…, 17 years ago

Attachment: error.avi added

H.264 clip that illustrates the reported bug

comment:1 by haakon.riiser@…, 17 years ago

comment:2 by xjirayuthx@…, 11 years ago

Cc: xjirayuthx@… added
op_sys: LinuxBSD/OS

comment:3 by xjirayuthx@…, 11 years ago

op_sys: BSD/OSLinux
Note: See TracTickets for help on using tickets.