BaseTools: CommonLib Fix Crash to write the last byte
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
(cherry picked from commit 4faf534046
)
This commit is contained in:
@ -335,7 +335,7 @@ Returns:
|
|||||||
printf("%x\n", Byte);
|
printf("%x\n", Byte);
|
||||||
Value = End + 1;
|
Value = End + 1;
|
||||||
}
|
}
|
||||||
Buffer = malloc(*Size);
|
Buffer = malloc(*Size + 1);
|
||||||
if (Buffer == NULL) {
|
if (Buffer == NULL) {
|
||||||
*Size = 0;
|
*Size = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user