Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_pad_key_and_iv panics if a chunk is missing #338

Open
davidpbrown opened this issue Sep 10, 2021 · 0 comments
Open

get_pad_key_and_iv panics if a chunk is missing #338

davidpbrown opened this issue Sep 10, 2021 · 0 comments
Labels

Comments

@davidpbrown
Copy link

davidpbrown commented Sep 10, 2021

Unclear if function get_pad_key_and_iv is used beyond just the basic_encryptor.

Following through the simple example

cargo build --example basic_encryptor --release

Which works well normally.

This panics, in the case that a block is missing:

src/lib.rs:247:21
from fn get_pad_key_and_iv

let src_hash = &chunk_hashes[chunk_index];

So, done just by moving a block out of the way.

$ ./basic_encryptor -d /tmp/chunk_store_test/secret_key "/tmp/chunk_store_test/hello"
thread '' panicked at 'index out of bounds: the len is 2 but the index is 2', src/lib.rs:247:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant