From 5f3fc928df037b21ee401d7115951b988a3ea571 Mon Sep 17 00:00:00 2001 From: Yvan Roux Date: Thu, 19 May 2022 10:58:13 +0100 Subject: [PATCH] _bfd_real_fopen should not use ccs parameter on Windows PR 25713 * bfdio.c (_bfd_real_fopen): Delete ccs string. --- bfd/ChangeLog | 5 +++++ bfd/bfdio.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0dc8f011d25..2178ca4a67a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2022-05-19 Yvan Roux + + PR 25713 + * bfdio.c (_bfd_real_fopen): Delete ccs string. + 2022-04-27 John Baldwin * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes. diff --git a/bfd/bfdio.c b/bfd/bfdio.c index 5c9a6555894..dc8d3916509 100644 --- a/bfd/bfdio.c +++ b/bfd/bfdio.c @@ -119,7 +119,6 @@ _bfd_real_fopen (const char *filename, const char *modes) /* PR 25713: Handle extra long path names possibly containing '..' and '.'. */ wchar_t ** lpFilePart = {NULL}; const wchar_t prefix[] = L"\\\\?\\"; - const wchar_t ccs[] = L", ccs=UNICODE"; const size_t partPathLen = strlen (filename) + 1; /* Converting the partial path from ascii to unicode. @@ -151,10 +150,9 @@ _bfd_real_fopen (const char *filename, const char *modes) free (partPath); /* It is non-standard for modes to exceed 16 characters. */ - wchar_t modesW[16 + sizeof(ccs)]; + wchar_t modesW[16]; MultiByteToWideChar (CP_UTF8, 0, modes, -1, modesW, sizeof(modesW)); - wcscat (modesW, ccs); FILE * file = _wfopen (fullPath, modesW); free (fullPath); -- 2.30.2