incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-69) [MSVC 6,8] wcsxfrm (s1, s2, 0) writes past the end of the destination buffer
Date Sat, 19 Nov 2005 00:57:41 GMT
[MSVC 6,8] wcsxfrm (s1, s2, 0) writes past the end of the destination buffer
----------------------------------------------------------------------------

         Key: STDCXX-69
         URL: http://issues.apache.org/jira/browse/STDCXX-69
     Project: STDCXX
        Type: Bug
    Versions: 4.1.2    
 Environment: MSVC 6, 8
    Reporter: Martin Sebor
     Fix For: 4.1.3


When compiled with MSVC 6 and 8 (but not 7.1), the program below segfaults at runtime:

$ cat t.cpp ; cl t.cpp && ./t.exe
#include <locale.h>
#include <wchar.h>

int main ()
{
    if (setlocale (LC_COLLATE, "ENU"))
        wcsxfrm (0, L"\x83", 0);
}
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

t.cpp
t.cpp(8) : warning C4508: 'main' : function should return a value; 'void' return type assumed
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:t.exe
t.obj
[1] + Done(139) cat t.cpp ; cl t.cpp && ./t.exe
 527 Segmentation violation ./t.exe

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message