mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 15:32:35 +00:00
Fixed stack overflow in error.c:msg2()
This commit is contained in:
parent
15e38be2f5
commit
9502d092a2
2 changed files with 6 additions and 1 deletions
5
CHANGES
5
CHANGES
|
@ -1,4 +1,9 @@
|
|||
|
||||
Corrections:
|
||||
In error.c msg2() there was a stack overflow on long messages: The
|
||||
terminating \0 Byte was written behind the last position.
|
||||
Thanks to Martin Liška for sending the address sanitizer report.
|
||||
|
||||
Porting:
|
||||
OpenSSL, at least 1.1 on Ubuntu, crashed with SIGSEGV under certain
|
||||
conditions: client connection to server with certificate with empty
|
||||
|
|
2
error.c
2
error.c
|
@ -318,7 +318,7 @@ void msg2(
|
|||
struct tm struct_tm;
|
||||
#endif
|
||||
#define BUFLEN 512
|
||||
char buff[BUFLEN], *bufp, *syslp;
|
||||
char buff[BUFLEN+1], *bufp, *syslp;
|
||||
size_t bytes;
|
||||
|
||||
#if HAVE_CLOCK_GETTIME
|
||||
|
|
Loading…
Reference in a new issue