Index: openssl-1.1.1b/crypto/err/err.c =================================================================== --- openssl-1.1.1b.orig/crypto/err/err.c 2019-02-26 15:15:30.000000000 +0100 +++ openssl-1.1.1b/crypto/err/err.c 2019-05-21 21:14:31.211536069 +0200 @@ -185,7 +185,7 @@ static ERR_STRING_DATA *int_err_get_item #ifndef OPENSSL_NO_ERR /* A measurement on Linux 2018-11-21 showed about 3.5kib */ -# define SPACE_SYS_STR_REASONS 4 * 1024 +# define SPACE_SYS_STR_REASONS 8 * 1024 # define NUM_SYS_STR_REASONS 127 static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1]; @@ -225,8 +225,8 @@ static void build_SYS_str_reasons(void) str->string = cur; cnt += l; - if (cnt > sizeof(strerror_pool)) - cnt = sizeof(strerror_pool); + if (cnt >= sizeof(strerror_pool)) + cnt = sizeof(strerror_pool) - 1; cur += l; /*