]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: Check the fread function and avoid dead loop
authorLiu, Zhiguang <zhiguang.liu@intel.com>
Fri, 10 May 2019 01:50:32 +0000 (09:50 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Fri, 10 May 2019 09:18:00 +0000 (17:18 +0800)
commitae3c247dbc943d707e5007f12f5a5862b4e97781
treece4b258156e153cfb861c7f75a34d46e43674607
parent6b74ccf0f8b53256b696ce921d50b873f6f9db57
BaseTools: Check the fread function and avoid dead loop

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1789

If the input file is not a valid file, it may cause dead loop,
because the return of fread function is not checked.

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/C/VolInfo/VolInfo.c