* [PATCH] BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing
@ 2022-07-19 9:49 Konstantin Aladyshev
2022-09-21 1:04 ` 回复: [edk2-devel] " gaoliming
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Aladyshev @ 2022-07-19 9:49 UTC (permalink / raw)
To: devel; +Cc: bob.c.feng, gaoliming, yuwei.chen, Konstantin Aladyshev
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* 回复: [edk2-devel] [PATCH] BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing
2022-07-19 9:49 [PATCH] BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing Konstantin Aladyshev
@ 2022-09-21 1:04 ` gaoliming
0 siblings, 0 replies; 2+ messages in thread
From: gaoliming @ 2022-09-21 1:04 UTC (permalink / raw)
To: devel, aladyshev22; +Cc: bob.c.feng, yuwei.chen
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]
> -=-=-=-=-=-=
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-21 1:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19 9:49 [PATCH] BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing Konstantin Aladyshev
2022-09-21 1:04 ` 回复: [edk2-devel] " gaoliming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox