[PATCH] include: Avoid subscript is above array bounds warning.

Mathew Hodson mathew.hodson at gmail.com
Sat Apr 18 01:52:35 CDT 2020


Signed-off-by: Mathew Hodson <mathew.hodson at gmail.com>
---
 include/wingdi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/wingdi.h b/include/wingdi.h
index 0a456f8..bdd1506 100644
--- a/include/wingdi.h
+++ b/include/wingdi.h
@@ -1916,7 +1916,7 @@ typedef struct {
 typedef struct tagBITMAPINFO
 {
     BITMAPINFOHEADER bmiHeader;
-    RGBQUAD          bmiColors[1];
+    RGBQUAD          bmiColors[256];
 } BITMAPINFO, *PBITMAPINFO, *LPBITMAPINFO;
 
 typedef struct
@@ -1931,7 +1931,7 @@ typedef struct
 typedef struct
 {
     BITMAPCOREHEADER bmciHeader;
-    RGBTRIPLE        bmciColors[1];
+    RGBTRIPLE        bmciColors[256];
 } BITMAPCOREINFO, *PBITMAPCOREINFO, *LPBITMAPCOREINFO;
 
 #define DIB_RGB_COLORS   0
-- 
2.7.4




More information about the wine-devel mailing list