Update - OpenSSL 1.1.1-pre7-dev
This commit is contained in:
+11
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -12,6 +12,12 @@
|
||||
#if !defined(OPENSSL_NO_STDIO)
|
||||
|
||||
# include <stdio.h>
|
||||
# ifdef _WIN32
|
||||
# include <windows.h>
|
||||
# endif
|
||||
# ifdef __DJGPP__
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
|
||||
FILE *openssl_fopen(const char *filename, const char *mode)
|
||||
{
|
||||
@@ -61,13 +67,14 @@ FILE *openssl_fopen(const char *filename, const char *mode)
|
||||
{
|
||||
char *newname = NULL;
|
||||
|
||||
if (!HAS_LFN_SUPPORT(filename)) {
|
||||
if (pathconf(filename, _PC_NAME_MAX) <= 12) { /* 8.3 file system? */
|
||||
char *iterator;
|
||||
char lastchar;
|
||||
|
||||
newname = OPENSSL_malloc(strlen(filename) + 1);
|
||||
if (newname == NULL)
|
||||
if ((newname = OPENSSL_malloc(strlen(filename) + 1)) == NULL) {
|
||||
CRYPTOerr(CRYPTO_F_OPENSSL_FOPEN, ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (iterator = newname, lastchar = '\0';
|
||||
*filename; filename++, iterator++) {
|
||||
|
||||
Reference in New Issue
Block a user