Thanks!
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
Source here:
http://git.gnome.org/browse/gdk-pixbuf/tree/gdk-pixbuf/io-ico.c
Relevant code at L237:
if (State->HeaderSize>State->BytesInHeaderBuf) {
guchar *tmp=g_try_realloc(State->HeaderBuf,State->HeaderSize);
if (!tmp) {
g_set_error_literal (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
_("Not enough memory to
load icon"));
return;
}
I think the problem is not a security bug, but rather that GDK is
doing a "try a malloc call but give me NULL when it fails because I
check for that", but we've mapped it to tcmalloc's "alloc or crash the
program".
It appears that glib will let override both its normal malloc (which
it also does crash-by-default) and it's "try malloc" separately:
static GMemVTable glib_mem_vtable = {
standard_malloc,
standard_realloc,
standard_free,
standard_calloc,
standard_try_malloc,
standard_try_realloc,
};
I put all of the relevant info on
http://code.google.com/p/chromium/issues/detail?id=51286
PS: I kind of thing we should only use tcmalloc for renderer
processes. tcmalloc in the browser process has been nothing but pain
-- I even had to write a patch recently to work around a bad
interaction with an nvidia driver!