[tor-bugs] #31567 [Applications/Tor Browser]: NS_tsnprintf() does not handle %s correctly on Windows

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Aug 31 11:00:50 UTC 2019


#31567: NS_tsnprintf() does not handle %s correctly on Windows
-------------------------------------------------+-------------------------
 Reporter:  mcs                                  |          Owner:  gk
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Very High                            |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Critical                             |     Resolution:
 Keywords:  ff68-esr, tbb-9.0-must-alpha,        |  Actual Points:
  TorBrowserTeam201908                           |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by gk):

 Okay, I built a new .exe with the following patch:
 {{{
 diff --git a/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
 b/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
 index bf9f4de2..a13286e5 100644
 --- a/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
 +++ b/mingw-w64-crt/stdio/ucrt__vsnwprintf.c
 @@ -10,6 +10,6 @@

  int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const
 wchar_t * __restrict__ _Format,va_list _Args)
 __MINGW_ATTRIB_DEPRECATED_SEC_WARN
  {
 -  return
 __stdio_common_vswprintf(UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION,
 _Dest, _Count, _Format, NULL, _Args);
 +  return
 __stdio_common_vswprintf(UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION
 | UCRTBASE_PRINTF_LEGACY_WIDE_SPECIFIERS, _Dest, _Count, _Format, NULL,
 _Args);
  }
  int __cdecl (*__MINGW_IMP_SYMBOL(_vsnwprintf))(wchar_t *__restrict__,
 size_t, const wchar_t *__restrict__, va_list) = _vsnwprintf;
 --
 2.23.0.rc1
 }}}
 https://people.torproject.org/~gk/testbuilds/31567.exe
 https://people.torproject.org/~gk/testbuilds/31567.exe.asc

 and took a .mar file from our recent nightly builds. That seems to get me
 past the problem we have, resulting in output similar to pospeselr's in
 comment:14.

 `failed: 6` seems to mean `#define READ_ERROR 6`. Not sure why this .mar
 file should not be readable, though. I'd have more expected a certificate
 related error as it is not signed...

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31567#comment:17>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list