Skip to content

Commit

Permalink
remove panic
Browse files Browse the repository at this point in the history
  • Loading branch information
sinui0 committed Jul 20, 2023
1 parent 9090162 commit 77cb544
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ot/mpz-ot-core/src/kos/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ pub enum SenderError {
InvalidState(String),
#[error("count mismatch: receiver expected {0}, got {1}")]
CountMismatch(usize, usize),
#[error("invalid extend")]
InvalidExtend,
#[error("consistency check failed")]
ConsistencyCheckFailed,
#[error("not enough OTs are setup: expected {0}, actual {1}")]
Expand Down
2 changes: 1 addition & 1 deletion ot/mpz-ot-core/src/kos/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl Sender<state::Extension> {
}

if us.len() != NROWS * row_width {
panic!();
return Err(SenderError::InvalidExtend);
}

let mut qs = vec![0u8; NROWS * row_width];
Expand Down

0 comments on commit 77cb544

Please sign in to comment.