diff options
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 65ce5bd..0b526d0 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -2596,7 +2596,11 @@ GetQuestionDefault ( if (StrValue == NULL) {
return EFI_NOT_FOUND;
}
- Question->BufferValue = AllocateCopyPool (StrSize (StrValue), StrValue);
+ if (Question->StorageWidth > StrSize (StrValue)) {
+ CopyMem (Question->BufferValue, StrValue, StrSize (StrValue));
+ } else {
+ CopyMem (Question->BufferValue, StrValue, Question->StorageWidth);
+ }
}
return EFI_SUCCESS;
|