summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--graphics/ocaml-images/files/patch-configure.ac10
-rw-r--r--graphics/ocaml-images/files/patch-src_tiffread.c21
-rw-r--r--graphics/ocaml-images/files/patch-tiff::tiffread.c14
3 files changed, 31 insertions, 14 deletions
diff --git a/graphics/ocaml-images/files/patch-configure.ac b/graphics/ocaml-images/files/patch-configure.ac
new file mode 100644
index 0000000..a3e65e9
--- /dev/null
+++ b/graphics/ocaml-images/files/patch-configure.ac
@@ -0,0 +1,10 @@
+--- configure.ac.orig 2010-03-26 01:15:49.000000000 -0700
++++ configure.ac 2010-03-26 01:15:52.000000000 -0700
+@@ -5,7 +5,6 @@
+
+ # Check ocaml
+ AC_PROG_OCAML([3.08])
+-AC_PROG_OCAML_TOOL(OCAMLMKLIB, ocamlmklib)
+ AC_SUBST(OCAMLLIB)
+
+ # Check versions to build
diff --git a/graphics/ocaml-images/files/patch-src_tiffread.c b/graphics/ocaml-images/files/patch-src_tiffread.c
new file mode 100644
index 0000000..e0aa834
--- /dev/null
+++ b/graphics/ocaml-images/files/patch-src_tiffread.c
@@ -0,0 +1,21 @@
+--- src/tiffread.c.orig 2010-03-26 01:20:08.000000000 -0700
++++ src/tiffread.c 2010-03-26 01:20:46.000000000 -0700
+@@ -20,6 +20,7 @@
+ #include <caml/alloc.h>
+ #include <caml/memory.h>
+ #include <caml/fail.h>
++#include "oversized.h"
+
+ /* These are defined in caml/config.h */
+ #define int16 int16tiff
+@@ -64,6 +65,10 @@
+ TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres);
+ TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric);
+
++ if (oversized (imagewidth, imagelength)) {
++ failwith_oversized("tiff");
++ }
++
+ if( imagesample == 3 && photometric == PHOTOMETRIC_RGB ){
+ if( imagebits != 8 ){
+ failwith("Sorry, tiff rgb file must be 24bit-color");
diff --git a/graphics/ocaml-images/files/patch-tiff::tiffread.c b/graphics/ocaml-images/files/patch-tiff::tiffread.c
deleted file mode 100644
index 983c735..0000000
--- a/graphics/ocaml-images/files/patch-tiff::tiffread.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- tiff/tiffread.c.orig Tue Sep 21 23:56:44 2004
-+++ tiff/tiffread.c Mon Dec 5 09:25:43 2005
-@@ -28,11 +28,6 @@
-
- #include <tiffio.h>
-
--#undef int16
--#undef uint16
--#undef int32
--#undef uint32
--
- extern value *imglib_error;
-
- value open_tiff_file_for_read( name )
OpenPOWER on IntegriCloud