public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] CrptoPkg/BaseCryptLib: Fix type mismatch when calling OpenSSL function
@ 2018-01-15  1:59 Zhang, Chao B
  2018-01-15  6:03 ` Long, Qin
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Chao B @ 2018-01-15  1:59 UTC (permalink / raw)
  To: edk2-devel; +Cc: Long Qin, Chen Chen, Chao Zhang

Type definition in UEFI & OpeenSSL is different. Sometime it could cause
write overflow. Should use same data type when accessing the same region

Cc: Long Qin <qin.long@intel.com>
Cc: Chen Chen <chen.a.chen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
 CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
index bf7c4cc..a3c9d12 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
@@ -644,9 +644,9 @@ X509GetTBSCert (
   )
 {
   CONST UINT8  *Temp;
-  INTN         Asn1Tag;
-  INTN         ObjClass;
-  UINTN        Length;
+  int          Asn1Tag;
+  int          ObjClass;
+  long         Length;
 
   //
   // Check input parameters.
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-15  7:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15  1:59 [PATCH] CrptoPkg/BaseCryptLib: Fix type mismatch when calling OpenSSL function Zhang, Chao B
2018-01-15  6:03 ` Long, Qin
2018-01-15  7:29   ` Zhang, Chao B

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox