From d1add475003855364790e41593429e550dbee376 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Sun, 13 Dec 2015 16:34:56 +0100 Subject: [PATCH] UF 0.10.4.1 - solved a problem with left on empty QByteArray --- UEFIFind/uefifind.cpp | 4 +++- UEFIFind/uefifind_main.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/UEFIFind/uefifind.cpp b/UEFIFind/uefifind.cpp index ca360bf..f8be94b 100644 --- a/UEFIFind/uefifind.cpp +++ b/UEFIFind/uefifind.cpp @@ -91,7 +91,9 @@ STATUS UEFIFind::find(const UINT8 mode, const bool count, const QString & hexPat QPair indexes; Q_FOREACH(indexes, files) { - QByteArray data = model->header(indexes.first).left(16); + QByteArray data(16, '\x00'); + if (!model->hasEmptyHeader(indexes.first)) + data = model->header(indexes.first).left(16); result.append(guidToQString((const UINT8*)data.constData())); // Special case of freeform subtype GUID files diff --git a/UEFIFind/uefifind_main.cpp b/UEFIFind/uefifind_main.cpp index 80c7456..2448e80 100644 --- a/UEFIFind/uefifind_main.cpp +++ b/UEFIFind/uefifind_main.cpp @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) return ERR_SUCCESS; } else { - std::cout << "UEFIFind 0.10.4" << std::endl << std::endl << + std::cout << "UEFIFind 0.10.4.1" << std::endl << std::endl << "Usage: uefifind {header | body | all} {list | count} pattern imagefile" << std::endl << " or uefifind file patternsfile imagefile" << std::endl; return ERR_INVALID_PARAMETER;