Merge 5.12 into 5.12.7
Change-Id: Ibc8bb93b238b79c7beacbb69ed2f691333af3af4
This commit is contained in:
commit
9d43d55b21
File diff suppressed because it is too large
Load Diff
29
src/3rdparty/sqlite/patches/0004-Fix-CVE-2019-19646-in-SQLite.patch
vendored
Normal file
29
src/3rdparty/sqlite/patches/0004-Fix-CVE-2019-19646-in-SQLite.patch
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
From a83bbce4d6f31d93ea4d2a681aa52c148f148e26 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Shaw <andy.shaw@qt.io>
|
||||
Date: Thu, 2 Jan 2020 09:07:08 +0100
|
||||
Subject: [PATCH] Fix CVE-2019-19646 in SQLite
|
||||
|
||||
Task-number: QTBUG-81020
|
||||
Change-Id: I7176db20d4a44b1fb443a6108675f719e9643343
|
||||
---
|
||||
src/3rdparty/sqlite/sqlite3.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
|
||||
index 57e61b8313..980a149b1a 100644
|
||||
--- a/src/3rdparty/sqlite/sqlite3.c
|
||||
+++ b/src/3rdparty/sqlite/sqlite3.c
|
||||
@@ -123765,7 +123765,9 @@ SQLITE_PRIVATE void sqlite3Pragma(
|
||||
if( j==pTab->iPKey ) continue;
|
||||
if( pTab->aCol[j].notNull==0 ) continue;
|
||||
sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, j, 3);
|
||||
- sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
|
||||
+ if( sqlite3VdbeGetOp(v,-1)->opcode==OP_Column ){
|
||||
+ sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
|
||||
+ }
|
||||
jmp2 = sqlite3VdbeAddOp1(v, OP_NotNull, 3); VdbeCoverage(v);
|
||||
zErr = sqlite3MPrintf(db, "NULL value in %s.%s", pTab->zName,
|
||||
pTab->aCol[j].zName);
|
||||
--
|
||||
2.21.0 (Apple Git-122.2)
|
||||
|
4
src/3rdparty/sqlite/sqlite3.c
vendored
4
src/3rdparty/sqlite/sqlite3.c
vendored
@ -123785,7 +123785,9 @@ SQLITE_PRIVATE void sqlite3Pragma(
|
||||
if( j==pTab->iPKey ) continue;
|
||||
if( pTab->aCol[j].notNull==0 ) continue;
|
||||
sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, j, 3);
|
||||
sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
|
||||
if( sqlite3VdbeGetOp(v,-1)->opcode==OP_Column ){
|
||||
sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
|
||||
}
|
||||
jmp2 = sqlite3VdbeAddOp1(v, OP_NotNull, 3); VdbeCoverage(v);
|
||||
zErr = sqlite3MPrintf(db, "NULL value in %s.%s", pTab->zName,
|
||||
pTab->aCol[j].zName);
|
||||
|
@ -38,6 +38,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qlibinputtouch_p.h"
|
||||
#include "qtouchoutputmapping_p.h"
|
||||
#include <libinput.h>
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QScreen>
|
||||
@ -45,6 +46,8 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(qLcLibInput)
|
||||
|
||||
QWindowSystemInterface::TouchPoint *QLibInputTouch::DeviceState::point(int32_t slot)
|
||||
{
|
||||
const int id = qMax(0, slot);
|
||||
@ -62,12 +65,23 @@ QLibInputTouch::DeviceState *QLibInputTouch::deviceState(libinput_event_touch *e
|
||||
return &m_devState[dev];
|
||||
}
|
||||
|
||||
static inline QPointF getPos(libinput_event_touch *e)
|
||||
QPointF QLibInputTouch::getPos(libinput_event_touch *e)
|
||||
{
|
||||
// TODO Map to correct screen using QTouchOutputMapping.
|
||||
// Perhaps investigate libinput_device_get_output_name as well.
|
||||
// For now just use the primary screen.
|
||||
DeviceState *state = deviceState(e);
|
||||
QScreen *screen = QGuiApplication::primaryScreen();
|
||||
if (!state->m_screenName.isEmpty()) {
|
||||
if (!m_screen) {
|
||||
const QList<QScreen *> screens = QGuiApplication::screens();
|
||||
for (QScreen *s : screens) {
|
||||
if (s->name() == state->m_screenName) {
|
||||
m_screen = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m_screen)
|
||||
screen = m_screen;
|
||||
}
|
||||
const QRect geom = QHighDpi::toNativePixels(screen->geometry(), screen);
|
||||
const double x = libinput_event_touch_get_x_transformed(e, geom.width());
|
||||
const double y = libinput_event_touch_get_y_transformed(e, geom.height());
|
||||
@ -76,9 +90,25 @@ static inline QPointF getPos(libinput_event_touch *e)
|
||||
|
||||
void QLibInputTouch::registerDevice(libinput_device *dev)
|
||||
{
|
||||
struct udev_device *udev_device;
|
||||
udev_device = libinput_device_get_udev_device(dev);
|
||||
QString devNode = QString::fromUtf8(udev_device_get_devnode(udev_device));
|
||||
QString devName = QString::fromUtf8(libinput_device_get_name(dev));
|
||||
|
||||
qCDebug(qLcLibInput, "libinput: registerDevice %s - %s",
|
||||
qPrintable(devNode), qPrintable(devName));
|
||||
|
||||
QTouchOutputMapping mapping;
|
||||
if (mapping.load()) {
|
||||
m_devState[dev].m_screenName = mapping.screenNameForDeviceNode(devNode);
|
||||
if (!m_devState[dev].m_screenName.isEmpty())
|
||||
qCDebug(qLcLibInput, "libinput: Mapping device %s to screen %s",
|
||||
qPrintable(devNode), qPrintable(m_devState[dev].m_screenName));
|
||||
}
|
||||
|
||||
QTouchDevice *&td = m_devState[dev].m_touchDevice;
|
||||
td = new QTouchDevice;
|
||||
td->setName(QString::fromUtf8(libinput_device_get_name(dev)));
|
||||
td->setName(devName);
|
||||
td->setType(QTouchDevice::TouchScreen);
|
||||
td->setCapabilities(QTouchDevice::Position | QTouchDevice::Area);
|
||||
QWindowSystemInterface::registerTouchDevice(td);
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QPointer>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
|
||||
//
|
||||
@ -60,6 +61,7 @@ struct libinput_device;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QScreen;
|
||||
class QLibInputTouch
|
||||
{
|
||||
public:
|
||||
@ -73,15 +75,18 @@ public:
|
||||
|
||||
private:
|
||||
struct DeviceState {
|
||||
DeviceState() : m_touchDevice(0) { }
|
||||
DeviceState() : m_touchDevice(nullptr), m_screenName() { }
|
||||
QWindowSystemInterface::TouchPoint *point(int32_t slot);
|
||||
QList<QWindowSystemInterface::TouchPoint> m_points;
|
||||
QTouchDevice *m_touchDevice;
|
||||
QString m_screenName;
|
||||
};
|
||||
|
||||
DeviceState *deviceState(libinput_event_touch *e);
|
||||
QPointF getPos(libinput_event_touch *e);
|
||||
|
||||
QHash<libinput_device *, DeviceState> m_devState;
|
||||
mutable QPointer<QScreen> m_screen;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include <QScreen>
|
||||
#include <QDir>
|
||||
#if QT_CONFIG(regularexpression)
|
||||
# include <QFileInfo>
|
||||
# include <QRegularExpression>
|
||||
#endif
|
||||
#include <QLoggingCategory>
|
||||
@ -144,7 +145,12 @@ int QEglFSDeviceIntegration::framebufferIndex() const
|
||||
int fbIndex = 0;
|
||||
#if QT_CONFIG(regularexpression)
|
||||
QRegularExpression fbIndexRx(QLatin1String("fb(\\d+)"));
|
||||
QRegularExpressionMatch match = fbIndexRx.match(QString::fromLocal8Bit(fbDeviceName()));
|
||||
QFileInfo fbinfo(QString::fromLocal8Bit(fbDeviceName()));
|
||||
QRegularExpressionMatch match;
|
||||
if (fbinfo.isSymLink())
|
||||
match = fbIndexRx.match(fbinfo.symLinkTarget());
|
||||
else
|
||||
match = fbIndexRx.match(fbinfo.fileName());
|
||||
if (match.hasMatch())
|
||||
fbIndex = match.captured(1).toInt();
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user