Skip to content

xfree86: Prealloacte morespace to mittigate invalid pointer issues after table reallocation

Łukasz Spintzyk requested to merge Spintzyk/xserver:fix_issue_910 into master

There are rare cases(#910 (closed)) when xf86SetDepthBpp is resizing displays array in confScreen. As that array is shared between set of ScrnInfoRec's then realloc might invalidate chached DispPtr display values in otheres ScrnInfoRec objects.

If we pre-allocate more space then necessary then a chance of need to reallocate will be minimized.

This is not ideal solution which is basing on assumption that reallocation won't happen as there is small chance of having more than 10 display config sections but it is still better than random crash on device plug in.

Merge request reports