1 Description: Filename buffer overflow fix
2 This patch fixes a security hole by a bad buffer size handling.
3 Author: Roland Stigge <stigge@antcom.de>
4 Bug-Debian: http://bugs.debian.org/645118
6 --- jasper-4.1.0/src/libjasper/include/jasper/jas_stream.h.orig 2023-11-05 07:24:51.000000000 +0100
7 +++ jasper-4.1.0/src/libjasper/include/jasper/jas_stream.h 2023-11-07 07:25:12.340731017 +0100
9 #include <jasper/jas_config.h> /* IWYU pragma: export */
13 #if defined(JAS_HAVE_FCNTL_H)
21 +#define JAS_PATH_MAX PATH_MAX
23 +#define JAS_PATH_MAX 4096
30 #if defined(JAS_WASI_LIBC)
33 - char pathname[L_tmpnam + 1];
34 + char pathname[JAS_PATH_MAX + 1];
35 } jas_stream_fileobj_t;
37 /* Delete underlying file object upon stream close. */