Skip to content

Commit 4aa7d7c

Browse files
committed
Check if buffer is not empty
IB-8239 Signed-off-by: Raul Metsma <[email protected]>
1 parent 5f1f558 commit 4aa7d7c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)
22
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake)
33
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
44
endif()
5-
project(qdigidoc4 VERSION 4.6.0)
5+
project(qdigidoc4 VERSION 4.6.1)
66

77
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
88
set(CMAKE_INCLUDE_CURRENT_DIR ON)

client/QCNG.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ QList<TokenData> QCNG::tokens() const
209209
continue;
210210

211211
if(reader.isEmpty())
212-
reader = QString::fromUtf16((const char16_t*)prop(key, NCRYPT_READER_PROPERTY).data());
212+
{
213+
if(QByteArray tmp = prop(key, NCRYPT_READER_PROPERTY); !tmp.isEmpty())
214+
reader = QString::fromUtf16((const char16_t*)tmp.data());
215+
}
213216
QString guid = prop(h, NCRYPT_SMARTCARD_GUID_PROPERTY).trimmed();
214217
TokenData &t = result.emplaceBack();
215218
t.setReader(reader);

0 commit comments

Comments
 (0)