[PUSHED][PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx
michael.meeks at suse.com
Thu Feb 16 13:01:42 PST 2012
On Thu, 2012-02-16 at 15:20 -0500, Kohei Yoshida wrote:
> > Is it a safe code?
> > pForbiddenCharacters = &maMap[ nLanguage ];
> > return pForbiddenCharacters;
> So, in theory, taking the address of a returned object which itself is a
> reference to the instance stored in the container is very much safe.
I guess :-) I imagine the real problem here is that any kind of
operation on the stl container could then realloc the underlying memory
in some way, busting the reference / pointer you handed out elsewhere;
so it looks only transiently safe to me ;-)
Or perhaps I'm missing something,
michael.meeks at suse.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice