From c60f00807e413c8dcd82a88e9be158bb4329ba6f Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sun, 2 Jan 2005 23:46:28 +0000 Subject: [PATCH] Change temporary file creation to tmpfile(). FullName was not initialized correctly before and it's only by chance that this worked at all. svn path=/trunk/; revision=12741 --- reactos/tools/cabman/cabinet.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/tools/cabman/cabinet.cxx b/reactos/tools/cabman/cabinet.cxx index 827555ca2c8..ef350631327 100755 --- a/reactos/tools/cabman/cabinet.cxx +++ b/reactos/tools/cabman/cabinet.cxx @@ -188,7 +188,7 @@ unsigned long CCFDATAStorage::Truncate() return CAB_STATUS_FAILURE; #else /* !WIN32 */ fclose(FileHandle); - FileHandle = fopen(FullName, "w+b"); + FileHandle = tmpfile(); if (FileHandle == NULL) { DPRINT(MID_TRACE, ("ERROR '%d'.\n", (unsigned int)errno)); return CAB_STATUS_FAILURE; @@ -532,6 +532,7 @@ bool CCabinet::SetCabinetReservedFile(char* FileName) return false; } #else /* !WIN32 */ + FileHandle = fopen(ConvertPath(FileName, true), "rb"); if (FileHandle == NULL) { DPRINT(MID_TRACE, ("Cannot open cabinet reserved file.\n"));