From 9d3c92f1a6a83260cae1e48a6d9685944ab9fcd1 Mon Sep 17 00:00:00 2001 From: dinoex Date: Mon, 29 Mar 2010 14:51:27 +0000 Subject: - fix build for png-1.4.1 --- graphics/ruby-libpng/files/patch-reader.c | 11 +++++++++++ graphics/ruby-libpng/files/patch-writer.c | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 graphics/ruby-libpng/files/patch-reader.c create mode 100644 graphics/ruby-libpng/files/patch-writer.c (limited to 'graphics') diff --git a/graphics/ruby-libpng/files/patch-reader.c b/graphics/ruby-libpng/files/patch-reader.c new file mode 100644 index 000000000000..09e5d6448cfb --- /dev/null +++ b/graphics/ruby-libpng/files/patch-reader.c @@ -0,0 +1,11 @@ +--- reader.c.orig 2000-09-28 04:19:46.000000000 +0200 ++++ reader.c 2010-03-29 16:43:24.000000000 +0200 +@@ -64,7 +64,7 @@ + { + VALUE proc; + +- if(png_ptr == NULL || row_number > PNG_MAX_UINT) ++ if(png_ptr == NULL || row_number > PNG_UINT_31_MAX) + return; + + proc = rb_iv_get(cReader, READ_STATUS_FN); diff --git a/graphics/ruby-libpng/files/patch-writer.c b/graphics/ruby-libpng/files/patch-writer.c new file mode 100644 index 000000000000..5f62933801da --- /dev/null +++ b/graphics/ruby-libpng/files/patch-writer.c @@ -0,0 +1,20 @@ +--- writer.c.orig 2000-09-28 04:22:32.000000000 +0200 ++++ writer.c 2010-03-29 16:42:29.000000000 +0200 +@@ -31,7 +31,7 @@ + if (png_obj->info->valid & PNG_INFO_PLTE) + free(png_obj->info->palette); + if (png_obj->info->valid & PNG_INFO_tRNS) +- free(png_obj->info->trans); ++ free(png_obj->info->trans_alpha); + + png_destroy_write_struct(&png_obj->obj, &png_obj->info); + free(png_obj); +@@ -67,7 +67,7 @@ + { + VALUE proc; + +- if(png_ptr == NULL || row_number > PNG_MAX_UINT || pass > 7) return; ++ if(png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) return; + + proc = rb_iv_get(cReader, WRITE_STATUS_FN); + -- cgit