aboutsummaryrefslogtreecommitdiff
path: root/bpkg/checksum.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/checksum.cxx')
-rw-r--r--bpkg/checksum.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/bpkg/checksum.cxx b/bpkg/checksum.cxx
index 95f2d80..3c9c4e5 100644
--- a/bpkg/checksum.cxx
+++ b/bpkg/checksum.cxx
@@ -269,7 +269,12 @@ namespace bpkg
try
{
- return f (sha256_path, o.sha256_option ());
+ process pr (f (sha256_path, o.sha256_option ()));
+
+ // Prevent any data modifications on the way to the hashing program.
+ //
+ fdmode (pr.out_fd, fdtranslate::binary);
+ return pr;
}
catch (const process_error& e)
{