Loading minzip/Zip.c +8 −2 Original line number Diff line number Diff line Loading @@ -1067,7 +1067,8 @@ bool mzExtractRecursive(const ZipArchive *pArchive, setfscreatecon(secontext); } int fd = creat(targetFile, UNZIP_FILEMODE); int fd = open(targetFile, O_CREAT|O_WRONLY|O_TRUNC|O_SYNC , UNZIP_FILEMODE); if (secontext) { freecon(secontext); Loading @@ -1082,7 +1083,12 @@ bool mzExtractRecursive(const ZipArchive *pArchive, } bool ok = mzExtractZipEntryToFile(pArchive, pEntry, fd); close(fd); if (ok) { ok = (fsync(fd) == 0); } if (close(fd) != 0) { ok = false; } if (!ok) { LOGE("Error extracting \"%s\"\n", targetFile); ok = false; Loading Loading
minzip/Zip.c +8 −2 Original line number Diff line number Diff line Loading @@ -1067,7 +1067,8 @@ bool mzExtractRecursive(const ZipArchive *pArchive, setfscreatecon(secontext); } int fd = creat(targetFile, UNZIP_FILEMODE); int fd = open(targetFile, O_CREAT|O_WRONLY|O_TRUNC|O_SYNC , UNZIP_FILEMODE); if (secontext) { freecon(secontext); Loading @@ -1082,7 +1083,12 @@ bool mzExtractRecursive(const ZipArchive *pArchive, } bool ok = mzExtractZipEntryToFile(pArchive, pEntry, fd); close(fd); if (ok) { ok = (fsync(fd) == 0); } if (close(fd) != 0) { ok = false; } if (!ok) { LOGE("Error extracting \"%s\"\n", targetFile); ok = false; Loading