public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
@ 2020-03-19 17:21 Jeff Brasen
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Brasen @ 2020-03-19 17:21 UTC (permalink / raw)
  To: devel; +Cc: dandan.bi, eric.dong, Jeff Brasen

Update function behavior to not modify the incoming string that is
marked as CONST in the prototype.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
 .../Universal/HiiDatabaseDxe/ConfigRouting.c        | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 2cad6d29f4..e08a62c387 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -5497,7 +5497,6 @@ HiiBlockToConfig (
   UINTN                               Index;
   UINT8                               *TemBuffer;
   CHAR16                              *TemString;
-  CHAR16                              TemChar;
 
   TmpBuffer = NULL;
 
@@ -5564,10 +5563,14 @@ HiiBlockToConfig (
   //
   // Copy <ConfigHdr> and an additional '&' to <ConfigResp>
   //
-  TemChar = *StringPtr;
-  *StringPtr = '\0';
-  AppendToMultiString(Config, ConfigRequest);
-  *StringPtr = TemChar;
+
+  TemString = AllocateCopyPool (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);
+  if (TemString == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+  TemString[StringPtr - ConfigRequest] = '\0';
+  AppendToMultiString(Config, TemString);
+  FreePool (TemString);
 
   //
   // Parse each <RequestElement> if exists
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
@ 2020-09-11 17:08 Jeff Brasen
  2020-09-14 14:15 ` Dandan Bi
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Brasen @ 2020-09-11 17:08 UTC (permalink / raw)
  To: devel; +Cc: dandan.bi, eric.dong, Jeff Brasen

Update function behavior to not modify the incoming string that is
marked as CONST in the prototype.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
 .../Universal/HiiDatabaseDxe/ConfigRouting.c         | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 2cad6d29f4..d492b769d5 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -5497,7 +5497,6 @@ HiiBlockToConfig (
   UINTN                               Index;
   UINT8                               *TemBuffer;
   CHAR16                              *TemString;
-  CHAR16                              TemChar;
 
   TmpBuffer = NULL;
 
@@ -5564,10 +5563,13 @@ HiiBlockToConfig (
   //
   // Copy <ConfigHdr> and an additional '&' to <ConfigResp>
   //
-  TemChar = *StringPtr;
-  *StringPtr = '\0';
-  AppendToMultiString(Config, ConfigRequest);
-  *StringPtr = TemChar;
+  TemString = AllocateCopyPool (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);
+  if (TemString == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+  TemString[StringPtr - ConfigRequest] = '\0';
+  AppendToMultiString(Config, TemString);
+  FreePool (TemString);
 
   //
   // Parse each <RequestElement> if exists
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
  2020-09-11 17:08 [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string Jeff Brasen
@ 2020-09-14 14:15 ` Dandan Bi
  2020-09-22 22:12   ` Jeff Brasen
  0 siblings, 1 reply; 7+ messages in thread
From: Dandan Bi @ 2020-09-14 14:15 UTC (permalink / raw)
  To: Jeff Brasen, devel@edk2.groups.io; +Cc: Dong, Eric

Reviewed-by: Dandan Bi <dandan.bi@intel.com>


Thanks,
Dandan
> -----Original Message-----
> From: Jeff Brasen <jbrasen@nvidia.com>
> Sent: Saturday, September 12, 2020 1:09 AM
> To: devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>;
> Jeff Brasen <jbrasen@nvidia.com>
> Subject: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
> 
> Update function behavior to not modify the incoming string that is marked as
> CONST in the prototype.
> 
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> ---
>  .../Universal/HiiDatabaseDxe/ConfigRouting.c         | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> index 2cad6d29f4..d492b769d5 100644
> --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> @@ -5497,7 +5497,6 @@ HiiBlockToConfig (
>    UINTN                               Index;   UINT8                               *TemBuffer;   CHAR16
> *TemString;-  CHAR16                              TemChar;    TmpBuffer = NULL; @@ -
> 5564,10 +5563,13 @@ HiiBlockToConfig (
>    //   // Copy <ConfigHdr> and an additional '&' to <ConfigResp>   //-
> TemChar = *StringPtr;-  *StringPtr = '\0';-  AppendToMultiString(Config,
> ConfigRequest);-  *StringPtr = TemChar;+  TemString = AllocateCopyPool
> (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);+  if
> (TemString == NULL) {+    return EFI_OUT_OF_RESOURCES;+  }+
> TemString[StringPtr - ConfigRequest] = '\0';+  AppendToMultiString(Config,
> TemString);+  FreePool (TemString);    //   // Parse each <RequestElement> if
> exists--
> 2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
  2020-09-14 14:15 ` Dandan Bi
@ 2020-09-22 22:12   ` Jeff Brasen
  2020-10-05 21:27     ` Jeff Brasen
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Brasen @ 2020-09-22 22:12 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io; +Cc: Dong, Eric

[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]

Thanks Dandan, are we waiting for any additional reviews on this change?


Thanks,

Jeff

________________________________
From: Bi, Dandan <dandan.bi@intel.com>
Sent: Monday, September 14, 2020 8:15 AM
To: Jeff Brasen <jbrasen@nvidia.com>; devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Dong, Eric <eric.dong@intel.com>
Subject: RE: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string

External email: Use caution opening links or attachments


Reviewed-by: Dandan Bi <dandan.bi@intel.com>


Thanks,
Dandan
> -----Original Message-----
> From: Jeff Brasen <jbrasen@nvidia.com>
> Sent: Saturday, September 12, 2020 1:09 AM
> To: devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>;
> Jeff Brasen <jbrasen@nvidia.com>
> Subject: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
>
> Update function behavior to not modify the incoming string that is marked as
> CONST in the prototype.
>
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> ---
>  .../Universal/HiiDatabaseDxe/ConfigRouting.c         | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> index 2cad6d29f4..d492b769d5 100644
> --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> @@ -5497,7 +5497,6 @@ HiiBlockToConfig (
>    UINTN                               Index;   UINT8                               *TemBuffer;   CHAR16
> *TemString;-  CHAR16                              TemChar;    TmpBuffer = NULL; @@ -
> 5564,10 +5563,13 @@ HiiBlockToConfig (
>    //   // Copy <ConfigHdr> and an additional '&' to <ConfigResp>   //-
> TemChar = *StringPtr;-  *StringPtr = '\0';-  AppendToMultiString(Config,
> ConfigRequest);-  *StringPtr = TemChar;+  TemString = AllocateCopyPool
> (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);+  if
> (TemString == NULL) {+    return EFI_OUT_OF_RESOURCES;+  }+
> TemString[StringPtr - ConfigRequest] = '\0';+  AppendToMultiString(Config,
> TemString);+  FreePool (TemString);    //   // Parse each <RequestElement> if
> exists--
> 2.25.1


[-- Attachment #2: Type: text/html, Size: 4205 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
  2020-09-22 22:12   ` Jeff Brasen
@ 2020-10-05 21:27     ` Jeff Brasen
  2020-10-06 10:49       ` [edk2-devel] " Laszlo Ersek
  2020-10-07  4:21       ` Wu, Hao A
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff Brasen @ 2020-10-05 21:27 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io; +Cc: Dong, Eric

[-- Attachment #1: Type: text/plain, Size: 2953 bytes --]

Are we looking for any other reviews on this?

Thanks,
Jeff


From: Jeff Brasen <jbrasen@nvidia.com>
Sent: Tuesday, September 22, 2020 4:13 PM
To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io
Cc: Dong, Eric <eric.dong@intel.com>
Subject: Re: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string

Thanks Dandan, are we waiting for any additional reviews on this change?


Thanks,

Jeff

________________________________
From: Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>
Sent: Monday, September 14, 2020 8:15 AM
To: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>
Subject: RE: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string

External email: Use caution opening links or attachments


Reviewed-by: Dandan Bi <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>


Thanks,
Dandan
> -----Original Message-----
> From: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
> Sent: Saturday, September 12, 2020 1:09 AM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>; Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>;
> Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
> Subject: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
>
> Update function behavior to not modify the incoming string that is marked as
> CONST in the prototype.
>
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
> ---
>  .../Universal/HiiDatabaseDxe/ConfigRouting.c         | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> index 2cad6d29f4..d492b769d5 100644
> --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> @@ -5497,7 +5497,6 @@ HiiBlockToConfig (
>    UINTN                               Index;   UINT8                               *TemBuffer;   CHAR16
> *TemString;-  CHAR16                              TemChar;    TmpBuffer = NULL; @@ -
> 5564,10 +5563,13 @@ HiiBlockToConfig (
>    //   // Copy <ConfigHdr> and an additional '&' to <ConfigResp>   //-
> TemChar = *StringPtr;-  *StringPtr = '\0';-  AppendToMultiString(Config,
> ConfigRequest);-  *StringPtr = TemChar;+  TemString = AllocateCopyPool
> (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);+  if
> (TemString == NULL) {+    return EFI_OUT_OF_RESOURCES;+  }+
> TemString[StringPtr - ConfigRequest] = '\0';+  AppendToMultiString(Config,
> TemString);+  FreePool (TemString);    //   // Parse each <RequestElement> if
> exists--
> 2.25.1

[-- Attachment #2: Type: text/html, Size: 6870 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
  2020-10-05 21:27     ` Jeff Brasen
@ 2020-10-06 10:49       ` Laszlo Ersek
  2020-10-07  4:21       ` Wu, Hao A
  1 sibling, 0 replies; 7+ messages in thread
From: Laszlo Ersek @ 2020-10-06 10:49 UTC (permalink / raw)
  To: devel, jbrasen, Bi, Dandan; +Cc: Dong, Eric

On 10/05/20 23:27, Jeff Brasen wrote:
> Are we looking for any other reviews on this?

I don't think so; Dandan is a designated reviewer for
"MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c".

The MdeModulePkg maintainers should merge this patch. (Dandan seems to
have no "M" access anywhere in edk2, so the PR needs to be submitted by
someone else.)

I could merge this myself, but I'm trying to make a point that
maintainership is a service to the community.

Thanks
Laszlo

> 
> Thanks,
> Jeff
> 
> 
> From: Jeff Brasen <jbrasen@nvidia.com>
> Sent: Tuesday, September 22, 2020 4:13 PM
> To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>
> Subject: Re: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
> 
> Thanks Dandan, are we waiting for any additional reviews on this change?
> 
> 
> Thanks,
> 
> Jeff
> 
> ________________________________
> From: Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>
> Sent: Monday, September 14, 2020 8:15 AM
> To: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
> Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>
> Subject: RE: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
> 
> External email: Use caution opening links or attachments
> 
> 
> Reviewed-by: Dandan Bi <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>
> 
> 
> Thanks,
> Dandan
>> -----Original Message-----
>> From: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
>> Sent: Saturday, September 12, 2020 1:09 AM
>> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
>> Cc: Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>; Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>;
>> Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
>> Subject: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
>>
>> Update function behavior to not modify the incoming string that is marked as
>> CONST in the prototype.
>>
>> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
>> ---
>>  .../Universal/HiiDatabaseDxe/ConfigRouting.c         | 12 +++++++-----
>>  1 file changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
>> b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
>> index 2cad6d29f4..d492b769d5 100644
>> --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
>> +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
>> @@ -5497,7 +5497,6 @@ HiiBlockToConfig (
>>    UINTN                               Index;   UINT8                               *TemBuffer;   CHAR16
>> *TemString;-  CHAR16                              TemChar;    TmpBuffer = NULL; @@ -
>> 5564,10 +5563,13 @@ HiiBlockToConfig (
>>    //   // Copy <ConfigHdr> and an additional '&' to <ConfigResp>   //-
>> TemChar = *StringPtr;-  *StringPtr = '\0';-  AppendToMultiString(Config,
>> ConfigRequest);-  *StringPtr = TemChar;+  TemString = AllocateCopyPool
>> (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);+  if
>> (TemString == NULL) {+    return EFI_OUT_OF_RESOURCES;+  }+
>> TemString[StringPtr - ConfigRequest] = '\0';+  AppendToMultiString(Config,
>> TemString);+  FreePool (TemString);    //   // Parse each <RequestElement> if
>> exists--
>> 2.25.1
> 
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
  2020-10-05 21:27     ` Jeff Brasen
  2020-10-06 10:49       ` [edk2-devel] " Laszlo Ersek
@ 2020-10-07  4:21       ` Wu, Hao A
  1 sibling, 0 replies; 7+ messages in thread
From: Wu, Hao A @ 2020-10-07  4:21 UTC (permalink / raw)
  To: devel@edk2.groups.io, jbrasen@nvidia.com, Bi, Dandan; +Cc: Dong, Eric

[-- Attachment #1: Type: text/plain, Size: 3511 bytes --]

Pushed via:
PR - https://github.com/tianocore/edk2/pull/987
Commit - c640186ec8aae6164123ee38de6409aed69eab12

Best Regards,
Hao Wu

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jeff Brasen
Sent: Tuesday, October 6, 2020 5:27 AM
To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io
Cc: Dong, Eric <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string

Are we looking for any other reviews on this?

Thanks,
Jeff


From: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
Sent: Tuesday, September 22, 2020 4:13 PM
To: Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>
Subject: Re: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string

Thanks Dandan, are we waiting for any additional reviews on this change?


Thanks,

Jeff

________________________________
From: Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>
Sent: Monday, September 14, 2020 8:15 AM
To: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>
Subject: RE: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string

External email: Use caution opening links or attachments


Reviewed-by: Dandan Bi <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>


Thanks,
Dandan
> -----Original Message-----
> From: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
> Sent: Saturday, September 12, 2020 1:09 AM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>; Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>;
> Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
> Subject: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string
>
> Update function behavior to not modify the incoming string that is marked as
> CONST in the prototype.
>
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com<mailto:jbrasen@nvidia.com>>
> ---
>  .../Universal/HiiDatabaseDxe/ConfigRouting.c         | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> index 2cad6d29f4..d492b769d5 100644
> --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> @@ -5497,7 +5497,6 @@ HiiBlockToConfig (
>    UINTN                               Index;   UINT8                               *TemBuffer;   CHAR16
> *TemString;-  CHAR16                              TemChar;    TmpBuffer = NULL; @@ -
> 5564,10 +5563,13 @@ HiiBlockToConfig (
>    //   // Copy <ConfigHdr> and an additional '&' to <ConfigResp>   //-
> TemChar = *StringPtr;-  *StringPtr = '\0';-  AppendToMultiString(Config,
> ConfigRequest);-  *StringPtr = TemChar;+  TemString = AllocateCopyPool
> (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);+  if
> (TemString == NULL) {+    return EFI_OUT_OF_RESOURCES;+  }+
> TemString[StringPtr - ConfigRequest] = '\0';+  AppendToMultiString(Config,
> TemString);+  FreePool (TemString);    //   // Parse each <RequestElement> if
> exists--
> 2.25.1


[-- Attachment #2: Type: text/html, Size: 8418 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-07  4:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-11 17:08 [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string Jeff Brasen
2020-09-14 14:15 ` Dandan Bi
2020-09-22 22:12   ` Jeff Brasen
2020-10-05 21:27     ` Jeff Brasen
2020-10-06 10:49       ` [edk2-devel] " Laszlo Ersek
2020-10-07  4:21       ` Wu, Hao A
  -- strict thread matches above, loose matches on Subject: below --
2020-03-19 17:21 Jeff Brasen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox