Opened 6 years ago

Closed 6 years ago

#7435 closed defect (invalid)

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

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

Description

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;
code

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.

Thanks,
Petru Florin Mihancea

Change History (1)

comment:1 by Carl Eugen Hoyos, 6 years ago

Resolution: invalid
Status: newclosed

I don't think this is a valid ticket.

Note: See TracTickets for help on using tickets.