Fix buffer overrun in Linux/x86_64 (Pixel is a 64 bit long, passing
a 32 bit int pointer to XtVaGetValues will cause trouble). Using a long should suffice. A configure test would be better. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,7 +52,7 @@ wxMemoryDC::wxMemoryDC(void)
|
||||
GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
|
||||
&gcvalues);
|
||||
|
||||
m_backgroundPixel = (int) gcvalues.background;
|
||||
m_backgroundPixel = gcvalues.background;
|
||||
|
||||
SetBrush (* wxWHITE_BRUSH);
|
||||
SetPen (* wxBLACK_PEN);
|
||||
@@ -79,7 +79,7 @@ wxMemoryDC::wxMemoryDC( wxDC* dc )
|
||||
GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
|
||||
&gcvalues);
|
||||
|
||||
m_backgroundPixel = (int) gcvalues.background;
|
||||
m_backgroundPixel = gcvalues.background;
|
||||
|
||||
SetBrush (* wxWHITE_BRUSH);
|
||||
SetPen (* wxBLACK_PEN);
|
||||
@@ -112,7 +112,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
|
||||
GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
|
||||
&gcvalues);
|
||||
|
||||
m_backgroundPixel = (int) gcvalues.background;
|
||||
m_backgroundPixel = gcvalues.background;
|
||||
m_ok = true;
|
||||
|
||||
SetBrush (* wxWHITE_BRUSH);
|
||||
|
Reference in New Issue
Block a user