diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-02-04 14:43:16 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-02-04 14:43:16 +0100 |
commit | cde5ee8fe527d3d672775909d27110d11c393774 (patch) | |
tree | 00952d6fac8cd1b5e5fae8a01b9bf24078adc887 /apt-pkg/contrib/gpgv.cc | |
parent | 3a015964dd56edf897ee062b2eafa2cfc0584380 (diff) |
gpgv: Use buffered writes for splitting clearsigned files
This is safe here, as the code ensures that the file is flushed
before it is being used. The next series should probably make
GetTempFile() buffer writes by default.
Diffstat (limited to 'apt-pkg/contrib/gpgv.cc')
-rw-r--r-- | apt-pkg/contrib/gpgv.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc index b845528d8..35d859849 100644 --- a/apt-pkg/contrib/gpgv.cc +++ b/apt-pkg/contrib/gpgv.cc @@ -535,7 +535,8 @@ bool SplitClearSignedFile(std::string const &InFile, FileFd * const ContentFile, /*}}}*/ bool OpenMaybeClearSignedFile(std::string const &ClearSignedFileName, FileFd &MessageFile) /*{{{*/ { - if (GetTempFile("clearsigned.message", true, &MessageFile) == nullptr) + // Buffered file + if (GetTempFile("clearsigned.message", true, &MessageFile, true) == nullptr) return false; if (MessageFile.Failed()) return _error->Error("Couldn't open temporary file to work with %s", ClearSignedFileName.c_str()); |