From 924143efc0e4ee8cc7adcc569b5d77435757f3d3 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 8 Aug 2024 15:21:21 +0200 Subject: [PATCH] chore: bump error message buffer size --- src/certs.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/certs.cc b/src/certs.cc index d071b45..b8888b0 100644 --- a/src/certs.cc +++ b/src/certs.cc @@ -16,7 +16,7 @@ struct Cleanup { // Throw an exception based on the last Windows error message. void ThrowWindowsError(const char* call) { DWORD err = GetLastError(); - CHAR err_msg_buf[128]; + CHAR err_msg_buf[256] = {}; FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM | @@ -36,7 +36,7 @@ void ThrowWindowsError(const char* call) { } } - char buf[256]; + char buf[384] = {}; snprintf(buf, sizeof(buf), "%s failed with: %s (0x%lx)",