瀏覽代碼

CID 315823 truncate on cast

JacobBarthelmeh 2 月之前
父節點
當前提交
763c4a074c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      wolfcrypt/src/asn.c

+ 1 - 1
wolfcrypt/src/asn.c

@@ -14855,7 +14855,7 @@ int wc_ValidateDate(const byte* date, byte format, int dateType)
 
     ltime = wc_Time(0);
 #ifndef NO_TIME_SIGNEDNESS_CHECK
-    if (sizeof(ltime) == sizeof(word32) && (int)ltime < 0){
+    if (sizeof(ltime) == sizeof(word32) && (sword32)ltime < 0){
         /* A negative response here could be due to a 32-bit time_t
          * where the year is 2038 or later. */
         WOLFSSL_MSG("wc_Time failed to return a valid value");