This is the mail archive of the gcc@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: use of %n in genmodes.c causes trouble on Vista


On Thu, Jun 07, 2007 at 12:09:46PM +0200, Paolo Bonzini wrote:
> 
> >printf (_("foo %s%n"), some_string, &n);
> >is ok even with -D_FORTIFY_SOURCE=2
> 
> How is this considered ok?  Is _("abc") placing the translation in 
> non-writable memory?

Yes, the *.mo file is mmaped and gettext either returns the passed
pointer if no translation is found, or a pointer into the read-only
mmaping of the *.mo file.

	Jakub


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