summaryrefslogtreecommitdiff
path: root/vcl/unx/x11
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-17 11:56:17 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-17 12:00:40 +0100
commitf31ac2405bbd0755fb14daa6cb84d7bb7d84c492 (patch)
treedf9b5dddea7b7103f59578ac7a7e1f033264c83c /vcl/unx/x11
parentcd11e8df3d1b15d0488993b7cec9e3de7da06c8c (diff)
Resolves: rhbz#1086714 overlarge pixmap
Change-Id: I015308406a43e6b039059a5e35316d59745d0a48
Diffstat (limited to 'vcl/unx/x11')
-rw-r--r--vcl/unx/x11/xlimits.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/unx/x11/xlimits.cxx b/vcl/unx/x11/xlimits.cxx
index 2d3606d7090a..b8509cbd2446 100644
--- a/vcl/unx/x11/xlimits.cxx
+++ b/vcl/unx/x11/xlimits.cxx
@@ -13,13 +13,12 @@
Pixmap limitXCreatePixmap(Display *display, Drawable d, unsigned int width, unsigned int height, unsigned int depth)
{
// The X protocol request CreatePixmap puts an upper bound
- // of 16 bit to the size. Beyond that there may be implementation
- // limits of the Xserver; which we should catch by a failed XCreatePixmap
- // call. However extra large values should be caught here since we'd run into
- // 16 bit truncation here without noticing.
+ // of 16 bit to the size. And in practice some drivers
+ // fall over with values close to the max.
- // see, e.g. moz#424333
- if (width > SAL_MAX_INT16 || height > SAL_MAX_INT16)
+ // see, e.g. moz#424333, fdo#48961, rhbz#1086714
+ // we've a duplicate of this in canvas :-(
+ if (width > SAL_MAX_INT16-10 || height > SAL_MAX_INT16-10)
{
SAL_WARN("vcl", "overlarge pixmap: " << width << " x " << height);
return None;