jasper (1.900.1-13) 02-fix-filename-buffer-overflow.patch

Summary

 src/libjasper/include/jasper/jas_stream.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 jasper (1.900.1-11) unstable; urgency=low
 .
   * Added Multiarch support, thanks to Colin Watson (Closes: #645118)
Author: Roland Stigge <stigge@antcom.de>
Bug-Debian: http://bugs.debian.org/645118

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- jasper-1.900.1.orig/src/libjasper/include/jasper/jas_stream.h
+++ jasper-1.900.1/src/libjasper/include/jasper/jas_stream.h
@@ -77,6 +77,7 @@
 #include <jasper/jas_config.h>
 
 #include <stdio.h>
+#include <limits.h>
 #if defined(HAVE_FCNTL_H)
 #include <fcntl.h>
 #endif
@@ -251,7 +252,7 @@ typedef struct {
 typedef struct {
 	int fd;
 	int flags;
-	char pathname[L_tmpnam + 1];
+	char pathname[PATH_MAX + 1];
 } jas_stream_fileobj_t;
 
 #define	JAS_STREAM_FILEOBJ_DELONCLOSE	0x01