Home
last modified time | relevance | path

Searched hist:b5cc636fa4ccd73498a0ac8d184ff192799d5d27 (Results 1 – 1 of 1) sorted by relevance

/haiku/src/add-ons/accelerants/common/
H A Dcreate_display_modes.cppb5cc636fa4ccd73498a0ac8d184ff192799d5d27 Fri Dec 09 15:00:35 UTC 2011 Michael Lotz <mmlr@mlotz.ch> Make a copy of the mode list as it might be realloced later.

The fModes array is realloc'ed as needed when adding modes. Therefore
the fModes pointer handed in to AddModes() becomes invalid once
_MakeSpace() returns in that function causing a freed memory block to
be used as input.

To avoid that we make a copy of the base mode list and then use that to
add the modes for each color space.