]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix the Y2K38_SAFETY finding found by Coverity scan.
authorKruti <kpendharkar@vmware.com>
Fri, 3 May 2024 16:05:45 +0000 (09:05 -0700)
committerKruti <kpendharkar@vmware.com>
Fri, 3 May 2024 16:05:45 +0000 (09:05 -0700)
Change the date type to 'long long' to make the size be 64 bits,
same as that of time_t.

open-vm-tools/libDeployPkg/linuxDeployment.c

index 4ddf3477a5abb5d89f4773cbfc694c77ced3a6b6..d31d52927af0bdd2879c58ef7339e26d82a3911d 100644 (file)
@@ -1,5 +1,6 @@
 /*********************************************************
- * Copyright (c) 2006-2023 VMware, Inc. All rights reserved.
+ * Copyright (c) 2006-2024 Broadcom. All rights reserved.
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -1758,7 +1759,7 @@ ExtractZipPackage(const char* pkgName,
    Bool ret = TRUE;
 
    // strip the header from the file
-   snprintf(zipName, sizeof zipName, "%s/%x", destDir, (unsigned int)time(0));
+   snprintf(zipName, sizeof zipName, "%s/%llx", destDir, (long long)time(NULL));
    zipName[(sizeof zipName) - 1] = '\0';
    if ((pkgFd = open(pkgName, O_RDONLY)) < 0) {
       sLog(log_error, "Failed to open package file '%s' for read. (%s)",