diff options
Diffstat (limited to 'graphics/jasper/files/patch-jas_stream.c')
-rw-r--r-- | graphics/jasper/files/patch-jas_stream.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/graphics/jasper/files/patch-jas_stream.c b/graphics/jasper/files/patch-jas_stream.c new file mode 100644 index 000000000000..83bc7ca2acce --- /dev/null +++ b/graphics/jasper/files/patch-jas_stream.c @@ -0,0 +1,19 @@ +--- src/libjasper/base/jas_stream.c Fri Jan 19 16:43:05 2007 ++++ src/libjasper/base/jas_stream.c Tue Jun 12 10:26:02 2007 +@@ -362,13 +362,12 @@ + obj->fd = -1; + obj->flags = 0; +- obj->pathname[0] = '\0'; ++ snprintf(obj->pathname, sizeof(obj->pathname), "/tmp/jasper.XXXXXX"); + stream->obj_ = obj; + + /* Choose a file name. */ +- tmpnam(obj->pathname); ++ obj->fd = mkstemp(obj->pathname); + + /* Open the underlying file. */ +- if ((obj->fd = open(obj->pathname, O_CREAT | O_EXCL | O_RDWR | O_TRUNC | O_BINARY, +- JAS_STREAM_PERMS)) < 0) { ++ if (obj->fd < 0) { + jas_stream_destroy(stream); + return 0; |