fix for sslecho in demos echoing garbage #18165
authorphilippe lhardy <pl@artisanlogiciel.net>
Mon, 25 Apr 2022 17:42:16 +0000 (19:42 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 21 Nov 2022 09:49:51 +0000 (10:49 +0100)
commita06a72f797d615eefb47dbc5037cb90f8f87027a
treec6599fc4f6fc193b1e9a44c68888cea616ead7a9
parent0c6bca7908523cd26acfd43c8841a5f199d7b45e
fix for sslecho in demos echoing garbage #18165

- getline does set &txbufp content at return, make sure it can be done.
  - fixes warning 'passing argument 1 of ‘getline’ from incompatible pointer type'
- remove OPENSSL_free on non allocated fixed size array
  - fixes 'free(): invalid pointer'

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18177)

(cherry picked from commit 3c0e8bc4a797d29b2152aebc6e687ddfa941160b)
demos/sslecho/main.c