]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools/GenFfs: Fix return too early when input file is of size 0
authorHao Wu <hao.a.wu@intel.com>
Wed, 9 Nov 2016 15:00:01 +0000 (23:00 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 10 Nov 2016 08:28:33 +0000 (16:28 +0800)
commitb390737ad03a354f5d11954950a580df715e2935
tree294d67d84835f12771abb1f6d67efc455bffe06e
parent8009b2e47ff4d877879b6dded83a4d9adb4445d2
BaseTools/GenFfs: Fix return too early when input file is of size 0

Commit 2cb874352423fcfd180199e6de8298567dff8e7f eliminates possible NULL
pointer dereference in GenFfs tool source codes. However, it doesn't
correctly handle the case when the input file is of size 0. This will lead
to possible build issues.

This commits refine the logic to handle the above case.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/GenFfs/GenFfs.c