Integer signedness error in format_jpeg.c in Asterisk 1.2.6 and earlier allows remote attackers to execute arbitrary code via a length value that passes a length check as a negative number, but triggers a buffer overflow when it is used as an unsigned length.
http://www.vupen.com/english/advisories/2006/1478
http://www.securityfocus.com/bid/17561
http://www.novell.com/linux/security/advisories/2006_04_28.html
http://www.debian.org/security/2006/dsa-1048
http://secunia.com/advisories/19897
http://secunia.com/advisories/19872
http://secunia.com/advisories/19800
http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.7-patch.gz