rustls / rustls-ffi

Use Rustls from any language
Other
124 stars 31 forks source link

tests/server.c: fix segfault when printing usage #319

Closed ctz closed 1 year ago

ctz commented 1 year ago
$ ./target/server
usage: ./target/server cert.pem key.pem

Listen on port 8443 with the given cert and key.
Segmentation fault (core dumped)

This was because the cleanup label skipped over the initialisation of certified_key, meaning the pointer was uninitialised during rustls_certified_key_free.

cpu commented 1 year ago

@cpu FYI CMake is only needed for Windows support. On Linux and macOS make should work fine.

Ahh! That makes things easier. Thanks