From 13b2197d49d189c32f3a268ed671166ad79767aa Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 4 Jul 2019 16:10:49 +0200 Subject: [esock] Format buffer length Corrected calculation of buffer length for format(ed) string. OTP-15817 --- erts/emulator/nifs/common/socket_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/emulator/nifs/common/socket_dbg.c b/erts/emulator/nifs/common/socket_dbg.c index 1180466c4c..0005575017 100644 --- a/erts/emulator/nifs/common/socket_dbg.c +++ b/erts/emulator/nifs/common/socket_dbg.c @@ -67,7 +67,7 @@ extern void esock_dbg_printf( const char* prefix, const char* format, ... ) { va_list args; - char f[512 + sizeof(format)]; // This has to suffice... + char f[512 + strlen(format)]; // This has to suffice... char stamp[30]; int res; -- cgit v1.2.3