Multiple integer overflows in libc in NetBSD 4.x, FreeBSD 6.x and 7.x, and probably other BSD and Apple Mac OS platforms allow context-dependent attackers to execute arbitrary code via large values of certain integer fields in the format argument to (1) the strfmon function in lib/libc/stdlib/strfmon.c, related to the GET_NUMBER macro; and (2) the printf function, related to left_prec and right_prec.
https://lists.opensuse.org/opensuse-security-announce/2010-10/msg00007.html
https://exchange.xforce.ibmcloud.com/vulnerabilities/41504
http://www.vupen.com/english/advisories/2008/3444
http://www.us-cert.gov/cas/techalerts/TA08-350A.html
http://www.securitytracker.com/id?1019722
http://www.securityfocus.com/bid/28479
http://www.securityfocus.com/archive/1/490158/100/0/threaded
http://www.debian.org/security/2010/dsa-2058
http://support.apple.com/kb/HT3338
http://secunia.com/advisories/33179
http://secunia.com/advisories/29574
http://lists.apple.com/archives/security-announce//2008//Dec/msg00000.html
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdlib/strfmon.c