This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
The ssh_custom_free() function was calling strlen() on binary public key
data, causing a heap buffer overflow when the data wasn't null-terminated.
It also caused keys with null bytes in them to be not cleared completely.
This patch uses the stored publickey_len field instead of strlen() to
determine the correct buffer size for zeroing memory.
This fix has been published in https://github.com/libgit2/libgit2/pull/7146
Nix uses libgit2, but not the libssh2 integration. Other applications may be
affected, and need this fix.