Opened 12 years ago Closed 12 years ago #1064 closed defect (fixed)TComPrediction may allocate undersized temp buffer
Description
In TComPrediction.cpp::initTempBuff(), the temp array is created with the global variables indicating max CU size. However if an new SPS comes in the sequence that specifies a larger max CU size, the buffer is not re-created and memory outside the arrays can be accessed. Attachments (1)Change History (5)comment:1 Changed 12 years ago by DefaultCC Plugin
Changed 12 years ago by pieterkapsenbergcomment:2 Changed 12 years ago by ksuehringcomment:3 Changed 12 years ago by ksuehring
comment:4 Changed 12 years ago by ksuehring
The patch was applied in r3403 Note: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber, Participant
|
The alternative would be to re-allocate the memory when a new SPS is activated. But I guess, in this case it would be fine to just use the maximum allowed values. The amount of memory that can be saved for smaller max CU size should be negligible (especially when frequent reallocation causes memory fragmentation).
I will apply the patch if nobody disagrees.