Opened 12 years ago

Closed 12 years ago

#1064 closed defect (fixed)

TComPrediction may allocate undersized temp buffer

Reported by: pieterkapsenberg Owned by: ksuehring
Priority: minor Milestone: HM-10.1
Component: HM Version: HM-10.0
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

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.
The attached patch fixes the issue by allocating the maximum possible size, regardless of globals.

Attachments (1)

TComPrediction.patch (1.6 KB) - added by pieterkapsenberg 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 12 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf jct-vc@… added

Changed 12 years ago by pieterkapsenberg

comment:2 Changed 12 years ago by ksuehring

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.

comment:3 Changed 12 years ago by ksuehring

  • Owner set to ksuehring
  • Status changed from new to assigned

comment:4 Changed 12 years ago by ksuehring

  • Resolution set to fixed
  • Status changed from assigned to closed

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

  • David Flynn(Subscriber)
  • Frank Bossen(Subscriber)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Owner, Subscriber, Participant, Always)
  • Pieter Kapsenberg(Reporter)