/whoami-bug

Demonstration of a bug and a fix

Primary LanguageRust

This demonstrates a bug and a fix in the whoami crate.

To run:

docker build .
docker run $CONTAINER_ID

Notice that the returned value of whomai::username() points to invalid memory.

In Cargo.toml uncomment the [patch.crates-io] section to apply the fix.