From 3f0ebec69d37a9a362d57417dfc07e86a2562f45 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Sat, 24 Jun 2023 21:21:22 +0100 Subject: [PATCH] 32bit max_int --- cpdfpng.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpdfpng.ml b/cpdfpng.ml index f8a6ea9..2e97e9e 100644 --- a/cpdfpng.ml +++ b/cpdfpng.ml @@ -64,7 +64,7 @@ let write_word b x n = Bytes.set b (x + 3) (char_of_int s) let write_png png o = - if bytes_size png.idat > 2147483647 then raise (Invalid_argument "write_png: too large") else + if bytes_size png.idat > 1073741823 then raise (Invalid_argument "write_png: too large") else if Array.length !tbl = 0 then mktbl (); o.output_string "\137\080\078\071\013\010\026\010"; let ihdr = Bytes.make 13 '\000' in