Opened 2 years ago

Closed 2 years ago

#7435 closed defect (invalid)

Possible access to unintended variable in "libavcodec/bitstream.c" line 227

Reported by: petrum Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


While experimenting with a CodeSonar? plugin we develop, we noticed a potential bug in file "libavcodec/bitstream.c" line 227, function build_table.

index = build_table(vlc, subtable_bits, k-i, codes+i, flags);
if (index < 0)

return index;

/* note: realloc has been done, so reload tables */
table = (volatile VLC_TYPE (*)[2])&vlc->table[table_index]; HERE
table[j][0] = index;

Shouldn't index be used instead of table_index? We are not too sure about this especially due to the following line (also using table and index) but we said to report it at least for a better code understanding.

Petru Florin Mihancea

Change History (1)

comment:1 Changed 2 years ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed

I don't think this is a valid ticket.

Note: See TracTickets for help on using tickets.