This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix Stack Smashing Protector to protect functions with wchar_t arrays


You cannot include c-common.h in the cfgexpand.c as some languages don't implement any thing in c-common.h.



Sent from my iPhone

On Sep 24, 2008, at 11:11 AM, Stefan Schulze Frielinghaus <stefan@seekline.net > wrote:

The Stack Smashing Protector does not include functions with wide
character arrays. The following code wouldn't be protected:

#include <wchar.h>

int main (void) {
       wchar_t buf[8];

wcscpy (buf, L"Hello World!");

       return 0;
}

Attached patch solves this problem. Tested on i686
<cfgexpand.c.patch>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]