Skip to content

get_pad_key_and_iv panics if a chunk is missing #338

Description

@davidpbrown

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions