forked from pool/openssl-1_1
Pedro Monreal Gonzalez
562c04ef89
- Fix a crash caused by long locale messages (bsc#1135550) * add openssl-fix_underflow_in_errstr_handling.patch OBS-URL: https://build.opensuse.org/request/show/704541 OBS-URL: https://build.opensuse.org/package/show/security:tls/openssl-1_1?expand=0&rev=34
25 lines
967 B
Diff
25 lines
967 B
Diff
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;
|
|
|
|
/*
|