Function haybale_pitchfork::hook_helpers::fill_unconstrained_with_length[][src]

pub fn fill_unconstrained_with_length<B: Backend>(
    state: &mut State<'_, B>,
    out_buffer: Either<&Operand, B::BV>,
    out_len_ptr: Either<&Operand, B::BV>,
    max_buffer_len_bytes: u32,
    buffer_name: String
) -> Result<()>
Expand description

Fills a buffer with unconstrained data, and also outputs the number of bytes written.

The entire max_buffer_len_bytes-byte buffer will be written, but the output number of bytes will be constrained to be any number between 0 and max_buffer_len_bytes.

For the buffer and length pointer, this accepts either an Operand or a BV. If an Operand is provided, it will be type-checked and converted to BV. If a BV is provided, we’ll assume the caller has done all appropriate typechecking.