mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 344023. Clamp offscreen buffer size to avoid crashes on huge windows. r+sr=roc
This commit is contained in:
parent
98ae77c3c1
commit
d920855c2b
@ -2213,6 +2213,11 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent)
|
||||
depth = gdk_drawable_get_depth(GDK_DRAWABLE(mDrawingarea->inner_window));
|
||||
}
|
||||
|
||||
// Make sure we won't create something that will overload the X server
|
||||
nsSize safeSize = GetSafeWindowSize(boundsRect.Size());
|
||||
boundsRect.width = safeSize.width;
|
||||
boundsRect.height = safeSize.height;
|
||||
|
||||
if (!gUseBufferPixmap ||
|
||||
boundsRect.width > gBufferPixmapMaxSize.width ||
|
||||
boundsRect.height > gBufferPixmapMaxSize.height)
|
||||
|
Loading…
Reference in New Issue
Block a user