]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
CryptoPkg/BaseCryptLib: Adding NULL checking in time() wrapper.
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / SysCall / ConstantTimeClock.c
index 7f20164999f35496d2968bf17abf73080e0cfa8a..0cd90434ca61c6aacfa76561fe54a0be0bba761a 100644 (file)
@@ -31,8 +31,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 time_t time (time_t *timer)\r
 {\r
-  *timer = 0;\r
-  return *timer;\r
+  if (timer != NULL) {\r
+    *timer = 0;\r
+  }\r
+  return 0;\r
 }\r
 \r
 struct tm * gmtime (const time_t *timer)\r