[][src]Trait genio::ReadOverwrite

pub unsafe trait ReadOverwrite: Read { }

This marker trait declares that the Read trait is implemented correctly, that means:

  1. implementation of read() and read_exact() doesn't read from provided buffer.
  2. if read() returns Ok(n), then each of first n bytes was overwritten.
  3. if read_exact() returns Ok(()) then each byte of buffer was overwritten.

Breaking this should not cause huge problems since untrusted input should be checked anyway but it might leak internal state of the application, containing secret data like private keys. Think of the Hartbleed bug.

Implementors

Loading content...