[Midnightbsd-cvs] mports [23417] trunk/x11-toolkits/qt4-gui/files: fixup patches
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon May 7 08:39:54 EDT 2018
Revision: 23417
http://svnweb.midnightbsd.org/mports/?rev=23417
Author: laffer1
Date: 2018-05-07 08:39:53 -0400 (Mon, 07 May 2018)
Log Message:
-----------
fixup patches
Added Paths:
-----------
trunk/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp
Removed Paths:
-------------
trunk/x11-toolkits/qt4-gui/files/patch-CVE-2015-0295
trunk/x11-toolkits/qt4-gui/files/patch-CVE-2015-1859
Deleted: trunk/x11-toolkits/qt4-gui/files/patch-CVE-2015-0295
===================================================================
--- trunk/x11-toolkits/qt4-gui/files/patch-CVE-2015-0295 2018-05-07 12:37:23 UTC (rev 23416)
+++ trunk/x11-toolkits/qt4-gui/files/patch-CVE-2015-0295 2018-05-07 12:39:53 UTC (rev 23417)
@@ -1,34 +0,0 @@
-commit e50aa2252cdd5cb53eef7d8c4503c7edff634f68
-Author: Richard J. Moore <rich at kde.org>
-Date: Tue Feb 24 19:02:35 2015 +0000
-
- Fix a division by zero when processing malformed BMP files.
-
- This fixes a division by 0 when processing a maliciously crafted BMP
- file. No impact beyond DoS.
-
- Backport of 661f6bfd032dacc62841037732816a583640e187
-
- Task-number: QTBUG-44547
- Change-Id: I43f06e752b11cb50669101460902a82b885ae618
- Reviewed-by: Thiago Macieira <thiago.macieira at intel.com>
-
---- src/gui/image/qbmphandler.cpp
-+++ src/gui/image/qbmphandler.cpp
-@@ -319,10 +319,16 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
- }
- } else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
- red_shift = calc_shift(red_mask);
-+ if (((red_mask >> red_shift) + 1) == 0)
-+ return false;
- red_scale = 256 / ((red_mask >> red_shift) + 1);
- green_shift = calc_shift(green_mask);
-+ if (((green_mask >> green_shift) + 1) == 0)
-+ return false;
- green_scale = 256 / ((green_mask >> green_shift) + 1);
- blue_shift = calc_shift(blue_mask);
-+ if (((blue_mask >> blue_shift) + 1) == 0)
-+ return false;
- blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
- } else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
- blue_mask = 0x000000ff;
Deleted: trunk/x11-toolkits/qt4-gui/files/patch-CVE-2015-1859
===================================================================
--- trunk/x11-toolkits/qt4-gui/files/patch-CVE-2015-1859 2018-05-07 12:37:23 UTC (rev 23416)
+++ trunk/x11-toolkits/qt4-gui/files/patch-CVE-2015-1859 2018-05-07 12:39:53 UTC (rev 23417)
@@ -1,53 +0,0 @@
-commit 3e55cd6dc467303a3c35312e9fcb255c2c048b32
-Author: Eirik Aavitsland <eirik.aavitsland at theqtcompany.com>
-Date: Wed Mar 11 13:34:01 2015 +0100
-
- Fixes crash in bmp and ico image decoding
-
- Fuzzing test revealed that for certain malformed bmp and ico files,
- the handler would segfault.
-
- Change-Id: I19d45145f31e7f808f7f6a1a1610270ea4159cbe
- (cherry picked from qtbase/2adbbae5432aa9d8cc41c6fcf55c2e310d2d4078)
- Reviewed-by: Richard J. Moore <rich at kde.org>
-
---- src/gui/image/qbmphandler.cpp
-+++ src/gui/image/qbmphandler.cpp
-@@ -478,12 +478,6 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
- p = data + (h-y-1)*bpl;
- break;
- case 2: // delta (jump)
-- // Protection
-- if ((uint)x >= (uint)w)
-- x = w-1;
-- if ((uint)y >= (uint)h)
-- y = h-1;
--
- {
- quint8 tmp;
- d->getChar((char *)&tmp);
-@@ -491,6 +485,13 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
- d->getChar((char *)&tmp);
- y += tmp;
- }
-+
-+ // Protection
-+ if ((uint)x >= (uint)w)
-+ x = w-1;
-+ if ((uint)y >= (uint)h)
-+ y = h-1;
-+
- p = data + (h-y-1)*bpl + x;
- break;
- default: // absolute mode
---- src/plugins/imageformats/ico/qicohandler.cpp
-+++ src/plugins/imageformats/ico/qicohandler.cpp
-@@ -571,7 +571,7 @@ QImage ICOReader::iconAt(int index)
- QImage::Format format = QImage::Format_ARGB32;
- if (icoAttrib.nbits == 24)
- format = QImage::Format_RGB32;
-- else if (icoAttrib.ncolors == 2)
-+ else if (icoAttrib.ncolors == 2 && icoAttrib.depth == 1)
- format = QImage::Format_Mono;
- else if (icoAttrib.ncolors > 0)
- format = QImage::Format_Indexed8;
Added: trunk/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp
===================================================================
--- trunk/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp (rev 0)
+++ trunk/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp 2018-05-07 12:39:53 UTC (rev 23417)
@@ -0,0 +1,48 @@
+Fixes the build on i386 with clang 6.0:
+
+kernel/qx11embed_x11.cpp:486:20: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'long' in initializer list [-Wc++11-narrowing]
+ long data[] = {XEMBED_VERSION, XEMBED_MAPPED};
+ ^~~~~~~~~~~~~~
+kernel/qx11embed_x11.cpp:486:20: note: insert an explicit cast to silence this issue
+ long data[] = {XEMBED_VERSION, XEMBED_MAPPED};
+ ^~~~~~~~~~~~~~
+ static_cast<long>( )
+
+--- src/gui/kernel/qx11embed_x11.cpp.orig 2018-01-07 21:44:01 UTC
++++ src/gui/kernel/qx11embed_x11.cpp
+@@ -275,7 +275,7 @@ class QHackWidget : public QWidget (public)
+ QTLWExtra* topData() { return d_func()->topData(); }
+ };
+
+-static unsigned int XEMBED_VERSION = 0;
++static quint32 XEMBED_VERSION = 0;
+
+ enum QX11EmbedMessageType {
+ XEMBED_EMBEDDED_NOTIFY = 0,
+@@ -483,7 +483,7 @@ QX11EmbedWidget::QX11EmbedWidget(QWidget *parent)
+ | ExposureMask | StructureNotifyMask
+ | SubstructureNotifyMask | PropertyChangeMask);
+
+- long data[] = {XEMBED_VERSION, XEMBED_MAPPED};
++ quint32 data[] = {XEMBED_VERSION, XEMBED_MAPPED};
+ XChangeProperty(x11Info().display(), internalWinId(), ATOM(_XEMBED_INFO),
+ ATOM(_XEMBED_INFO), 32, PropModeReplace,
+ (unsigned char*) data, 2);
+@@ -1578,7 +1578,7 @@ void QX11EmbedContainer::showEvent(QShowEvent *)
+ {
+ Q_D(QX11EmbedContainer);
+ if (d->client) {
+- long data[] = {XEMBED_VERSION, XEMBED_MAPPED};
++ quint32 data[] = {XEMBED_VERSION, XEMBED_MAPPED};
+ XChangeProperty(x11Info().display(), d->client, ATOM(_XEMBED_INFO), ATOM(_XEMBED_INFO), 32,
+ PropModeReplace, (unsigned char *) data, 2);
+ }
+@@ -1594,7 +1594,7 @@ void QX11EmbedContainer::hideEvent(QHideEvent *)
+ {
+ Q_D(QX11EmbedContainer);
+ if (d->client) {
+- long data[] = {XEMBED_VERSION, XEMBED_MAPPED};
++ quint32 data[] = {XEMBED_VERSION, XEMBED_MAPPED};
+ XChangeProperty(x11Info().display(), d->client, ATOM(_XEMBED_INFO), ATOM(_XEMBED_INFO), 32,
+ PropModeReplace, (unsigned char *) data, 2);
+ }
Property changes on: trunk/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list