Fix potential overflow for SetVariable interface

Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by  : Guo Dong   <dong.guo@intel.com>
Reviewed-by  : Siyuan Fu  <siyuan.fu@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14305 6f19259b-4bc3-4df7-8a09-765794883524
Add security check.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14306 6f19259b-4bc3-4df7-8a09-765794883524
Enhance InitializeLanguage() to set PcdUefiVariableDefaultPlatformLang to PlatformLang variable if the value of PlatformLang variable has been set an unsupported value(not one of PlatformLangCodes variable), and assert when default (Platform)Lang PCD value is not set to one of (Platform)LangCodes PCD value.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14307 6f19259b-4bc3-4df7-8a09-765794883524