~sircmpwn/hare-ssh

5fde1388200ccb9b21f3fd194b472051721c5ec5 — Armin Preiml 1 year, 3 months ago dbcb4b4
decodesshprivate: make sure padding is freed
1 files changed, 3 insertions(+), 1 deletions(-)

M format/ssh/sshprivkey.ha
M format/ssh/sshprivkey.ha => format/ssh/sshprivkey.ha +3 -1
@@ 74,7 74,9 @@ export fn decodesshprivate(in: io::handle) (sshprivkey | error) = {
	key.privkey = readslice(&dec)?;

	// Add padding bytes
	append(key.privkey, io::drain(&dec)?...);
	let padding = io::drain(&dec)?;
	defer free(padding);
	append(key.privkey, padding...);

	return key;
};