Skip to content

Revert "fix too small array in XGI_CRT1TableStruct"

Alan Coopersmith requested to merge alanc/xf86-video-xgi:revert into master

This reverts commit 6e5981da. It failed to take zero-indexing into account, and only raised the size to 16, while using [16] means the size must be at least 17.

gcc 14.1 still warns:

In function ‘XGI_New_SetCRT1CRTC’,
    inlined from ‘XGI_New_SetCRT1Group’ at init.c:856:6,
    inlined from ‘XGIBIOSSetModeCRT1’ at init.c:995:4:
init.c:556:51: warning: array subscript 16 is above array bounds of ‘const UCHAR[16]’ {aka ‘const unsigned char[16]’} [-Warray-bounds=]
  556 |      temp = ((XGI_Pr->XGINEWUB_CRT1Table[index].CR[16]) & 0x01) << 5;
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Merge request reports