BaseTools/Source/C/VolInfo/VolInfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Currently 'PutFileImage' function is called with arguments that are
not advanced on each section parsing. This would lead to an error if
EFI_SECTION_GUID_DEFINED is not the first in a file.
Use correct arguments to fix the issue.
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
---
BaseTools/Source/C/VolInfo/VolInfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c
index ed56587058..c1f81f2dcb 100644
--- a/BaseTools/Source/C/VolInfo/VolInfo.c
+++ b/BaseTools/Source/C/VolInfo/VolInfo.c
@@ -2000,8 +2000,8 @@ Returns:
Status =
PutFileImage (
ToolInputFile,
- (CHAR8*) SectionBuffer + DataOffset,
- BufferLength - DataOffset
+ (CHAR8*)Ptr + DataOffset,
+ SectionLength - DataOffset
);
system (SystemCommand);
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91526): https://edk2.groups.io/g/devel/message/91526
Mute This Topic: https://groups.io/mt/92479030/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> > -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Konstantin > Aladyshev > 发送时间: 2022年7月19日 17:50 > 收件人: devel@edk2.groups.io > 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn; > yuwei.chen@intel.com; Konstantin Aladyshev <aladyshev22@gmail.com> > 主题: [edk2-devel] [PATCH] BaseTools/VolInfo: Fix > EFI_SECTION_GUID_DEFINED parsing > > Currently 'PutFileImage' function is called with arguments that are > not advanced on each section parsing. This would lead to an error if > EFI_SECTION_GUID_DEFINED is not the first in a file. > Use correct arguments to fix the issue. > > Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> > --- > BaseTools/Source/C/VolInfo/VolInfo.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c > b/BaseTools/Source/C/VolInfo/VolInfo.c > index ed56587058..c1f81f2dcb 100644 > --- a/BaseTools/Source/C/VolInfo/VolInfo.c > +++ b/BaseTools/Source/C/VolInfo/VolInfo.c > @@ -2000,8 +2000,8 @@ Returns: > Status = > > PutFileImage ( > > ToolInputFile, > > - (CHAR8*) SectionBuffer + DataOffset, > > - BufferLength - DataOffset > > + (CHAR8*)Ptr + DataOffset, > > + SectionLength - DataOffset > > ); > > > > system (SystemCommand); > > -- > 2.25.1 > > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#91526): https://edk2.groups.io/g/devel/message/91526 > Mute This Topic: https://groups.io/mt/92479030/4905953 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [gaoliming@byosoft.com.cn] > -=-=-=-=-=-= > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94022): https://edk2.groups.io/g/devel/message/94022 Mute This Topic: https://groups.io/mt/93817885/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.