You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some DFCI setting, ProviderValueAsAscii function now uses predefined macros to allocate buffer which is not flexible if we add new setting with bigger size, causing string truncated.
The new feature is to refactor the function to remove following macros and allocate buffer with right size for each setting.
## Description
Refactor ProviderValueAsAscii() and remove following macros to make it can allocate buffer with right size for each setting.
Fix#43
```
#define ENABLED_STRING_SIZE (9)
#define ASSET_TAG_STRING_MAX_SIZE (22)
#define SECURE_BOOT_ENUM_STRING_SIZE (20)
#define SYSTEM_PASSWORD_STATE_STRING_SIZE (30)
#define USB_PORT_STATE_STRING_SIZE (20)
```
- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware functions?
- Examples: Add a new library, publish a new PPI, update an algorithm, ...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an application,
flow, or firmware?
- Examples: Crypto algorithm change, buffer overflow fix, parameter
validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a break
in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo, call
a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
- **Tests** - Does the change include any explicit test code?
- Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation additions
outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to documentation
on an a separate Web page, ...
## How This Was Tested
Tested with SEMM tool. No regression seen.
## Integration Instructions
N/A
Feature Overview
For some DFCI setting, ProviderValueAsAscii function now uses predefined macros to allocate buffer which is not flexible if we add new setting with bigger size, causing string truncated.
The new feature is to refactor the function to remove following macros and allocate buffer with right size for each setting.
Solution Overview
Calculate new size of each setting and allocate buffer with the new size, then copy new value to the buffer.
Alternatives Considered
No response
Urgency
Low
Are you going to implement the feature request?
I will implement the feature
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response
The text was updated successfully, but these errors were encountered: