See URL. Dunno if we need this patch. I just want to point your attention on it.
After update to media-libs/libpng-1.6.1 and rebuild cairo with it, I found app-i18n/fcitx-4.2.7 crashing with SIGSEGV. Further inspection reveals fcitx is trying to read a PNG image with cairo_image_surface_create_from_png() (fcitx-4.2.7/src/ui/classic/InputWindow.c:69 -> fcitx-4.2.7/src/ui/classic/skin.c:240), then checks if the returned cairo surface has an error. After upgrading to libpng-1.6.1, cairo started failing to read the PNG image with CAIRO_STATUS_NO_MEMORY. When there are an error, fcitx frees the surface and return NULL, yet it later doesn't handling this NULL pointer gracefully and segfaults. Applying the patch in the FreeDesktop bug report to x11-libs/cairo-1.12.12-r1 fixes the issue immediately. So, just to confirm here that the problem does exists and the patch is useful indeed.
+*cairo-1.12.14 (11 Apr 2013) + + 11 Apr 2013; Lars Wendler <polynomial-c@gentoo.org> + +files/cairo-libpng16.patch, +cairo-1.12.14.ebuild: + Non-maintainer commit: Version bump (bug #456818). Added libpng16 patch (bug + #465044). Committed with kind permission from yngwin. +