Browse Source

HPCC-15208 time_t is not always 32-bit

memcpy is assuming incorrect size for time_t. This PR corrects it to use
sizeof()

Signed-off-by: Russ Whitehead <william.whitehead@lexisnexis.com>
Russ Whitehead 9 years ago
parent
commit
6abdc43478
1 changed files with 1 additions and 1 deletions
  1. 1 1
      system/security/shared/caching.cpp

+ 1 - 1
system/security/shared/caching.cpp

@@ -30,7 +30,7 @@ time_t getThreadCreateTime()
     if(tslval == NULL)
     if(tslval == NULL)
         return 0;
         return 0;
 
 
-    memcpy(&t, tslval, 4);
+    memcpy(&t, tslval, sizeof(t));
     return t;
     return t;
 }
 }