summaryrefslogtreecommitdiffstats
path: root/recipes-qt
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2020-05-19 02:06:53 +0200
committerraquel medina <raquel.medina@konsulko.com>2020-05-19 14:47:51 +0000
commitf3f60c39dbbef209d27c1334ff0272da324e7472 (patch)
tree4ac1c45b56b747c7fb2f186eb38856914d5b2f10 /recipes-qt
parent830f7bab3adb74a890c4f40aa2831d535bac06d3 (diff)
Bug-AGL: SPEC-3364 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I74b3e66e3fe14c37b75beee7316941f4268395bd
Diffstat (limited to 'recipes-qt')
-rw-r--r--recipes-qt/qt-qrcode/qt-qrcode/0002-fix-dangling-pointer.patch25
-rw-r--r--recipes-qt/qt-qrcode/qt-qrcode_git.bb3
2 files changed, 27 insertions, 1 deletions
diff --git a/recipes-qt/qt-qrcode/qt-qrcode/0002-fix-dangling-pointer.patch b/recipes-qt/qt-qrcode/qt-qrcode/0002-fix-dangling-pointer.patch
new file mode 100644
index 000000000..489a49edb
--- /dev/null
+++ b/recipes-qt/qt-qrcode/qt-qrcode/0002-fix-dangling-pointer.patch
@@ -0,0 +1,25 @@
+From 5fc5a92e3568674a08a6e7594d050e963d0d854b Mon Sep 17 00:00:00 2001
+From: Raquel Medina <raquel.medina@konsulko.com>
+Date: Mon, 18 May 2020 19:18:00 +0200
+Subject: [PATCH] fix dangling pointer
+
+Bug-AGL: SPEC-3664
+Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
+---
+ lib/qtqrcode.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/lib/qtqrcode.cpp b/lib/qtqrcode.cpp
+index a7000f0..825c354 100644
+--- a/lib/qtqrcode.cpp
++++ b/lib/qtqrcode.cpp
+@@ -116,8 +116,7 @@ void QtQrCode::setBaseQrCodeData(QRcode *qrCode)
+ {
+ d->width = qrCode->width;
+ d->data.clear();
+- // TODO: Beware it here
+- d->data = (const char *) qrCode->data;
++ d->data = QByteArray(reinterpret_cast<const char *>(qrCode->data), d->width*d->width);
+ QRcode_free(qrCode);
+ }
+
diff --git a/recipes-qt/qt-qrcode/qt-qrcode_git.bb b/recipes-qt/qt-qrcode/qt-qrcode_git.bb
index 8b3ff79a9..0a7ae7308 100644
--- a/recipes-qt/qt-qrcode/qt-qrcode_git.bb
+++ b/recipes-qt/qt-qrcode/qt-qrcode_git.bb
@@ -9,7 +9,8 @@ DEPENDS = "qtbase qtdeclarative qtquickcontrols2 qtsvg qrencode"
SRC_URI = "git://github.com/danielsanfr/qt-qrcode.git;protocol=https \
file://0001-rework-library-build.patch \
-"
+ file://0002-fix-dangling-pointer.patch \
+ "
SRCREV = "2d57d9c6e2341689d10f9360a16a08831a4a820b"
PV = "git${SRCPV}"