From a529951b958479c05d64692cb1e9991ad2691821 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Fri, 31 Aug 2018 17:44:16 +0300 Subject: [PATCH] Fix crc pointer accessor --- README.md | 2 +- common/ffsbuilder.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 25134a5..0615e34 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Right now there are some alternatives to UEFITool that you could find useful too You can either use [pre-built binaries for Windows and macOS](https://github.com/LongSoft/UEFITool/releases) or build a binary yourself. * To build a binary that uses Qt library (UEFITool) you need a C++ compiler and an instance of [Qt5](https://www.qt.io) library. Install both of them, get the sources, generate makefiles using qmake (`qmake UEFITool.pro`) and use your system's make command on that generated files (i.e. `nmake release`, `make release` and so on). -* To build a binary that doesn't use Qt (UEFIExtract, UEFIFind), you need a C++ compiler and [CMAKE](https://cmake.org) utility to generate a makefile for your OS and build environment. Install both of them, get the sources, generate makefiles using cmake (`cmake UEFIDump`) and use your system's make command on that generated files (i.e. `nmake release`, `make release` and so on). +* To build a binary that doesn't use Qt (UEFIExtract, UEFIFind), you need a C++ compiler and [CMAKE](https://cmake.org) utility to generate a makefile for your OS and build environment. Install both of them, get the sources, generate makefiles using cmake (`cmake UEFIFind`) and use your system's make command on that generated files (i.e. `nmake release`, `make release` and so on). ## Known issues diff --git a/common/ffsbuilder.cpp b/common/ffsbuilder.cpp index 81be6dc..558945a 100644 --- a/common/ffsbuilder.cpp +++ b/common/ffsbuilder.cpp @@ -978,7 +978,7 @@ USTATUS FfsBuilder::buildNvramStore(const UModelIndex & index, UByteArray & stor // Recalculate store checksum UINT32 calculatedCrc = crc32(0, (const UINT8*)store.constData(), (const UINT32)store.size() - sizeof(UINT32)); // Write new checksum - body.replace((const UINT32)body.size() - sizeof(UINT32), sizeof(UINT32), (const char*)calculatedCrc, sizeof(UINT32)); + body.replace((const UINT32)body.size() - sizeof(UINT32), sizeof(UINT32), &calculatedCrc, sizeof(UINT32)); } else if(type == Types::EvsaStore) { UByteArray store = header + body;