diff options
author | Florian Klink <flokli@flokli.de> | 2023-02-16T16·11+0100 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2023-03-10T10·58+0000 |
commit | ab02fc668c23a4f0f262dd889278f2fc36793f9e (patch) | |
tree | 1be5ba5925644035439687827e4ddb57a64ea565 /tvix/store/src/nar/mod.rs | |
parent | bc3f71838f76b9ec141e1012f49e2a24d067c3c8 (diff) |
feat(tvix/store): validate blob size in NARRenderer r/5917
Make sure the blob size in the current proto node matches what we get back from the blob backend. Change-Id: I939fa18f37c7bc86ada8a495c7be622e69ec47f8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8129 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/store/src/nar/mod.rs')
-rw-r--r-- | tvix/store/src/nar/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tvix/store/src/nar/mod.rs b/tvix/store/src/nar/mod.rs index d7d2cec4d803..a3a8677d92a6 100644 --- a/tvix/store/src/nar/mod.rs +++ b/tvix/store/src/nar/mod.rs @@ -17,6 +17,9 @@ pub enum RenderError { #[error("unable to find blob {}, referred from {}", BASE64.encode(.0), .1)] BlobNotFound(Vec<u8>, String), + #[error("unexpected size in metadata for blob {}, referred from {} returned, expected {}, got {}", BASE64.encode(.0), .1, .2, .3)] + UnexpectedBlobMeta(Vec<u8>, String, u32, u32), + #[error("failure using the NAR writer: {0}")] NARWriterError(std::io::Error), } |