From 41e3ccf6921229135ed80a534f845ed0ee3df2f9 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Thu, 1 Oct 2015 08:53:19 +0200 Subject: [PATCH] Corrected tail append on extraction --- UEFITool/ffsops.cpp | 2 +- common/parsingdata.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/UEFITool/ffsops.cpp b/UEFITool/ffsops.cpp index 53ac90b..6d3b70f 100644 --- a/UEFITool/ffsops.cpp +++ b/UEFITool/ffsops.cpp @@ -85,7 +85,7 @@ STATUS FfsOperations::extract(const QModelIndex & index, QString & name, QByteAr // Handle file tail if (model->type(index) == Types::File) { if (pdata.file.hasTail) - extracted.append(pdata.file.tail); + extracted.append(pdata.file.tailArray[0]).append(pdata.file.tailArray[1]); } } else if (mode == EXTRACT_MODE_BODY) { diff --git a/common/parsingdata.h b/common/parsingdata.h index 5ee9eaa..818891f 100644 --- a/common/parsingdata.h +++ b/common/parsingdata.h @@ -43,7 +43,10 @@ typedef struct _VOLUME_PARSING_DATA { //} FREE_SPACE_PARSING_DATA; typedef struct _FILE_PARSING_DATA { - UINT16 tail; + union { + UINT8 tailArray[2]; + UINT16 tail; + }; BOOLEAN hasTail; } FILE_PARSING_DATA;