Skip to content

Commit

Permalink
add length check in eigenda_data.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
immersify-app committed Jan 3, 2025
1 parent c69886f commit 736de0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/eigenda/src/eigenda_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ impl EigenDABlobData {
helpers::remove_empty_byte_from_padded_bytes_unchecked(codec_data.as_ref());
let blob_content: Bytes = blob_content.into();

if blob_content.len() < content_size as usize {
return Err(BlobDecodingError::InvalidLength);
}
// might insert a FFT here,

// take data
Expand Down

0 comments on commit 736de0b

Please sign in to comment.