1 From 5fc5a92e3568674a08a6e7594d050e963d0d854b Mon Sep 17 00:00:00 2001
2 From: Raquel Medina <raquel.medina@konsulko.com>
3 Date: Mon, 18 May 2020 19:18:00 +0200
4 Subject: [PATCH] fix dangling pointer
7 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
9 lib/qtqrcode.cpp | 3 +--
10 1 file changed, 1 insertion(+), 2 deletions(-)
12 diff --git a/lib/qtqrcode.cpp b/lib/qtqrcode.cpp
13 index a7000f0..825c354 100644
14 --- a/lib/qtqrcode.cpp
15 +++ b/lib/qtqrcode.cpp
16 @@ -116,8 +116,7 @@ void QtQrCode::setBaseQrCodeData(QRcode *qrCode)
18 d->width = qrCode->width;
20 - // TODO: Beware it here
21 - d->data = (const char *) qrCode->data;
22 + d->data = QByteArray(reinterpret_cast<const char *>(qrCode->data), d->width*d->width);