diff options
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/C/Common/MemoryFile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/BaseTools/Source/C/Common/MemoryFile.c b/BaseTools/Source/C/Common/MemoryFile.c index 1d90688..ec27619 100644 --- a/BaseTools/Source/C/Common/MemoryFile.c +++ b/BaseTools/Source/C/Common/MemoryFile.c @@ -222,6 +222,9 @@ Returns: // Increment the current file pointer (include the 0x0A)
//
InputFile->CurrentFilePointer += CharsToCopy + 1;
+ if (InputFile->CurrentFilePointer > InputFile->Eof) {
+ InputFile->CurrentFilePointer = InputFile->Eof;
+ }
CheckMemoryFileState (InputMemoryFile);
//
|