MdeModulePkg/Ps2Mouse: Fix potential buffer overflow issue.
authorRuiyu Ni <ruiyu.ni@intel.com>
Wed, 13 Apr 2016 06:11:38 +0000 (14:11 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 13 Apr 2016 06:54:43 +0000 (14:54 +0800)
commitaab04141dc13f2a0a6423c859c29fd3ef8761595
treebd1f17fdda9fb680c3c7b9bbe37401a6aaeb6bea
parent8d878f84d270da490f92989e1f87b7019bdca148
MdeModulePkg/Ps2Mouse: Fix potential buffer overflow issue.

Count is initially 1 but is assigned to 2 in case PS2_READ_DATA_BYTE.
Though the state machine doesn't go back from PS2_READ_DATA_BYTE to
PS2_READ_BYTE_ONE (not a true bug), force assign Count to 1 to avoid
potential buffer overflow issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
MdeModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.c