diff options
author | Zihong Yi <yizihong@huawei.com> | 2022-12-02 13:51:50 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-12-03 09:01:38 +0000 |
commit | 7de1c71dd2f4e04bd832fc7b92c8255161705393 (patch) | |
tree | d2bafb9e237322a2344c426d25d08413245874ff /CryptoPkg/Library/Include | |
parent | 5d5be45bd11117c1e479863125e7d772e54772c9 (diff) | |
download | edk2-7de1c71dd2f4e04bd832fc7b92c8255161705393.tar.gz edk2-7de1c71dd2f4e04bd832fc7b92c8255161705393.tar.bz2 edk2-7de1c71dd2f4e04bd832fc7b92c8255161705393.zip |
CryptoPkg/BaseCryptLib:time overflow
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4167
In CrtLibSupport.h, time_t is defined as INT32, and its maximum value
is 2147483647. That is, the corresponding maximum timestamp is
2038-01-19 11:14:07. Therefore, overflow occurs when the test time
exceeds 2038-01-19 11:14:07. So change the type of time_t to INT64 and
also change the type of variables in function gmtime which calculated
with time_t.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Zihong Yi <yizihong@huawei.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'CryptoPkg/Library/Include')
-rw-r--r-- | CryptoPkg/Library/Include/CrtLibSupport.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h index 5072c343da..94b0e6b601 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -109,7 +109,7 @@ typedef UINTN off_t; typedef UINTN u_int;
typedef INTN ptrdiff_t;
typedef INTN ssize_t;
-typedef INT32 time_t;
+typedef INT64 time_t;
typedef UINT8 __uint8_t;
typedef UINT8 sa_family_t;
typedef UINT8 u_char;
|