mirror of https://github.com/acidanthera/audk.git
BaseTools CommonLib: Update ReadMemoryFileLine() to read line in file scope
https://bugzilla.tianocore.org/show_bug.cgi?id=255 Check CurrentFilePointer to make sure it not exceed the end of file. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
parent
ff9a1358b3
commit
60a5378208
|
@ -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);
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue