Skip to content

Commit

Permalink
Fix CodeQL issue for delimiter index in GDB parsing (#20)
Browse files Browse the repository at this point in the history
## Description

Fix potential index overflow in GDB parsing.

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

N/A

## Integration Instructions

N/A
  • Loading branch information
cfernald authored Apr 22, 2024
1 parent f138aa3 commit aa1ff35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DebuggerFeaturePkg/Library/DebugAgent/GdbStub/GdbStub.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ ProcessVCommand (
UINT32 CommandLength
)
{
UINT8 OriginalDelimiter;
UINT8 DelimiterIndex;
UINT8 OriginalDelimiter;
UINT32 DelimiterIndex;

// Replace the ; or ? with a terminator;
for (DelimiterIndex = 0; DelimiterIndex < CommandLength; DelimiterIndex++) {
Expand Down

0 comments on commit aa1ff35

Please sign in to comment.