[openssl] master update
Richard Levitte
levitte at openssl.org
Sat Nov 28 20:20:05 UTC 2020
The branch master has been updated
via d27a8e922ba0b5357abf435cca75b5fe133cfe94 (commit)
from bf4cdd4abfa28ad52ece035ea25831921aee21c5 (commit)
- Log -----------------------------------------------------------------
commit d27a8e922ba0b5357abf435cca75b5fe133cfe94
Author: Richard Levitte <levitte at openssl.org>
Date: Fri Nov 27 08:08:08 2020 +0100
TEST: Fix path length in test/ossl_store_test.c
The URI length was set to 80 chars, but the URI being built up may
need more space, all depending on the paths used to get to the files
that are to be loaded. If the result needs more than 80 chars, the
test will fail.
Fixed by using PATH_MAX.
Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13546)
-----------------------------------------------------------------------
Summary of changes:
test/ossl_store_test.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/test/ossl_store_test.c b/test/ossl_store_test.c
index e1ee820085..f48c282b2e 100644
--- a/test/ossl_store_test.c
+++ b/test/ossl_store_test.c
@@ -7,10 +7,19 @@
* https://www.openssl.org/source/license.html
*/
+#include <limits.h>
#include <openssl/store.h>
#include <openssl/ui.h>
#include "testutil.h"
+#ifndef PATH_MAX
+# if defined(_WIN32) && defined(_MAX_PATH)
+# define PATH_MAX _MAX_PATH
+# else
+# define PATH_MAX 4096
+# endif
+#endif
+
typedef enum OPTION_choice {
OPT_ERR = -1,
OPT_EOF = 0,
@@ -85,7 +94,7 @@ static int get_params(const char *uri, const char *type)
static int test_store_get_params(int idx)
{
const char *type;
- char uri[80];
+ char uri[PATH_MAX];
switch(idx) {
#ifndef OPENSSL_NO_DH
More information about the openssl-commits
mailing list