summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+github@glassechidna.com.au>2016-03-01 07:57:37 +0100
committerBenjamin Dobell <benjamin.dobell+github@glassechidna.com.au>2016-03-01 07:57:37 +0100
commit2bab8d9473cc237f6665a9cfe784942e0a2038e8 (patch)
tree66290929ce2f418bc4140136751719fc01c565c2
parentMerge pull request #287 from yan12125/allow-disable-gui (diff)
parent- fixed possible null pointer access (diff)
downloadHeimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar
Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.gz
Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.bz2
Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.lz
Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.xz
Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.zst
Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.zip
-rw-r--r--cmake/Findlibusb.cmake4
-rw-r--r--heimdall-frontend/source/mainwindow.cpp4
-rw-r--r--heimdall/source/FlashAction.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/cmake/Findlibusb.cmake b/cmake/Findlibusb.cmake
index 69811bc..3e21b98 100644
--- a/cmake/Findlibusb.cmake
+++ b/cmake/Findlibusb.cmake
@@ -10,10 +10,10 @@ find_path(LIBUSB_INCLUDE_DIR
)
if (libusb_USE_STATIC_LIBS AND NOT MSVC)
- set (LIBUSB_LIB_PREFIX "lib" CACHE INTERNAL "libusb library name prefox passed to find_library")
+ set (LIBUSB_LIB_PREFIX "lib" CACHE INTERNAL "libusb library name prefix passed to find_library")
set (LIBUSB_LIB_SUFFIX ".a" CACHE INTERNAL "libusb library name suffix passed to find_library")
else (libusb_USE_STATIC_LIBS AND NOT MSVC)
- set (LIBUSB_LIB_PREFIX "" CACHE INTERNAL "libusb library name prefox passed to find_library")
+ set (LIBUSB_LIB_PREFIX "" CACHE INTERNAL "libusb library name prefix passed to find_library")
set (LIBUSB_LIB_SUFFIX "" CACHE INTERNAL "libusb library name suffix passed to find_library")
endif (libusb_USE_STATIC_LIBS AND NOT MSVC)
diff --git a/heimdall-frontend/source/mainwindow.cpp b/heimdall-frontend/source/mainwindow.cpp
index e110d69..f06fb4e 100644
--- a/heimdall-frontend/source/mainwindow.cpp
+++ b/heimdall-frontend/source/mainwindow.cpp
@@ -131,7 +131,7 @@ bool MainWindow::ReadPit(QFile *file)
file->close();
bool success = currentPitData.Unpack(buffer);
- delete buffer;
+ delete[] buffer;
if (!success)
currentPitData.Clear();
@@ -659,7 +659,7 @@ void MainWindow::SelectPartitionName(int index)
partitionFileGroup->setTitle(title);
- if (!fileInfo.GetFilename().isEmpty())
+ if (pitEntry && !fileInfo.GetFilename().isEmpty())
{
QString partitionFilename = pitEntry->GetFlashFilename();
int lastPeriod = partitionFilename.lastIndexOf(QChar('.'));
diff --git a/heimdall/source/FlashAction.cpp b/heimdall/source/FlashAction.cpp
index 590e0b5..d9203b0 100644
--- a/heimdall/source/FlashAction.cpp
+++ b/heimdall/source/FlashAction.cpp
@@ -185,7 +185,7 @@ static bool sendTotalTransferSize(BridgeManager *bridgeManager, const vector<Par
if (totalBytesResult != 0)
{
- Interface::PrintError("Unexpected session total bytes response!\nExpected: 0\nReceived:%d\n", totalBytesResponse);
+ Interface::PrintError("Unexpected session total bytes response!\nExpected: 0\nReceived:%d\n", totalBytesResult);
return (false);
}