ca8428
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3522
ca8428
ca8428
diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_stream.c jasper-1.900.1/src/libjasper/base/jas_stream.c
ca8428
--- jasper-1.900.1.orig/src/libjasper/base/jas_stream.c	2009-10-22 10:27:45.000000000 +0200
ca8428
+++ jasper-1.900.1/src/libjasper/base/jas_stream.c	2009-10-22 10:35:53.000000000 +0200
ca8428
@@ -553,7 +553,7 @@ int jas_stream_printf(jas_stream_t *stre
ca8428
 	int ret;
ca8428
 
ca8428
 	va_start(ap, fmt);
ca8428
-	ret = vsprintf(buf, fmt, ap);
ca8428
+	ret = vsnprintf(buf, sizeof buf, fmt, ap);
ca8428
 	jas_stream_puts(stream, buf);
ca8428
 	va_end(ap);
ca8428
 	return ret;