Skip to content

Commit

Permalink
Check if buffer is not empty
Browse files Browse the repository at this point in the history
IB-8239

Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma committed Oct 17, 2024
1 parent 5f1f558 commit 4aa7d7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake)
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
endif()
project(qdigidoc4 VERSION 4.6.0)
project(qdigidoc4 VERSION 4.6.1)

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down
5 changes: 4 additions & 1 deletion client/QCNG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ QList<TokenData> QCNG::tokens() const
continue;

if(reader.isEmpty())
reader = QString::fromUtf16((const char16_t*)prop(key, NCRYPT_READER_PROPERTY).data());
{
if(QByteArray tmp = prop(key, NCRYPT_READER_PROPERTY); !tmp.isEmpty())
reader = QString::fromUtf16((const char16_t*)tmp.data());
}
QString guid = prop(h, NCRYPT_SMARTCARD_GUID_PROPERTY).trimmed();
TokenData &t = result.emplaceBack();
t.setReader(reader);
Expand Down

0 comments on commit 4aa7d7c

Please sign in to comment.