diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.c index 8ae21450c4..da11789625 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.c @@ -256,10 +256,10 @@ Returns: // do not set currentline to Line
//
if (Count <= 0) {
- AbsCount = -Count;
+ AbsCount = (UINTN)ABS(Count);
Line = _HLineRetreat (AbsCount);
} else {
- Line = _HLineAdvance (Count);
+ Line = _HLineAdvance ((UINTN)Count);
}
return Line;
@@ -297,10 +297,10 @@ Returns: // >0: advance
//
if (Count <= 0) {
- AbsCount = -Count;
+ AbsCount = (UINTN)ABS(Count);
Line = _HLineRetreat (AbsCount);
} else {
- Line = _HLineAdvance (Count);
+ Line = _HLineAdvance ((UINTN)Count);
}
if (Line == NULL) {
@@ -399,7 +399,10 @@ Returns: Lenp = StrLen (Pat);
Lens = StrLen (Str);
- Failure = AllocateZeroPool (Lenp * sizeof (INTN));
+ Failure = AllocateZeroPool ((UINTN)(Lenp * sizeof (INTN)));
+ if (Failure == NULL) {
+ return 0;
+ }
Failure[0] = -1;
for (j = 1; j < Lenp; j++) {
i = Failure[j - 1];
|