From 5268f0280cd9d2f2f4880f01fb378a47e65aec35 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 31 Mar 2015 14:37:48 +0100 Subject: [PATCH] raw open allows larger offsets offsets were sanity-checked at 100,000, remove this limit --- doc/gtk-doc.make | 12 ++++-------- libvips/iofuncs/image.c | 9 +-------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/doc/gtk-doc.make b/doc/gtk-doc.make index 19ec2648..e7916563 100644 --- a/doc/gtk-doc.make +++ b/doc/gtk-doc.make @@ -25,7 +25,6 @@ TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ - $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt @@ -87,7 +86,7 @@ GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ + files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ @@ -163,7 +162,7 @@ GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ @@ -195,7 +194,7 @@ GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ @@ -224,15 +223,12 @@ clean-local: @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ - rm -f $(DOC_MODULE)-sections.txt; \ - fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ + rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ fi maintainer-clean-local: diff --git a/libvips/iofuncs/image.c b/libvips/iofuncs/image.c index e6ed794f..8bfa2849 100644 --- a/libvips/iofuncs/image.c +++ b/libvips/iofuncs/image.c @@ -963,13 +963,6 @@ vips_image_build( VipsObject *object ) break; case 'a': - /* Ban crazy numbers. - */ - if( image->sizeof_header > 1000000 ) { - vips_error( "VipsImage", "%s", _( "bad parameters" ) ); - return( -1 ); - } - if( (image->fd = vips__open_image_read( filename )) == -1 ) return( -1 ); image->dtype = VIPS_IMAGE_OPENIN; @@ -1227,7 +1220,7 @@ vips_image_class_init( VipsImageClass *class ) _( "Offset in bytes from start of file" ), VIPS_ARGUMENT_SET_ONCE | VIPS_ARGUMENT_CONSTRUCT, G_STRUCT_OFFSET( VipsImage, sizeof_header ), - 0, 1000000, VIPS_SIZEOF_HEADER ); + 0, 1000000000, VIPS_SIZEOF_HEADER ); VIPS_ARG_POINTER( class, "foreign_buffer", 17, _( "Foreign buffer" ),