Skip to content

Commit

Permalink
Release 8.10.5-build2
Browse files Browse the repository at this point in the history
- Fix runtime error with empty buffers when linking against UCRT (lovell/sharp#2494).
- Fix AVIF decode/encode on CPUs lacking support for the AVX2 instruction set (kleisauke/net-vips#104).
  • Loading branch information
kleisauke committed Dec 27, 2020
1 parent bf2884b commit 131a9d0
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/aom.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define $(PKG)_BUILD
cd '$(BUILD_DIR)' && NASM_PATH='$(PREFIX)/$(BUILD)/bin' $(TARGET)-cmake \
-DENABLE_NASM=ON \
-DENABLE_TESTS=OFF \
-DCONFIG_RUNTIME_CPU_DETECT=0 \
$(if $(IS_ARM), -DCONFIG_RUNTIME_CPU_DETECT=0) \
$(if $(IS_LLVM),, -DCONFIG_PIC=1) \
$(if $(call seq,i686,$(PROCESSOR)), -DAOM_TARGET_CPU='x86') \
'$(SOURCE_DIR)'
Expand Down
51 changes: 51 additions & 0 deletions build/patches/vips-8-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <[email protected]>
Date: Tue, 22 Dec 2020 10:32:43 +0100
Subject: [PATCH 1/2] Ensure memory source is non-null


diff --git a/libvips/iofuncs/source.c b/libvips/iofuncs/source.c
index 1111111..2222222 100644
--- a/libvips/iofuncs/source.c
+++ b/libvips/iofuncs/source.c
@@ -318,7 +318,9 @@ vips_source_build( VipsObject *object )
if( vips_object_argument_isset( object, "blob" ) ) {
size_t length;

- source->data = vips_blob_get( source->blob, &length );
+ if( !(source->data = vips_blob_get( source->blob, &length )) )
+ return( -1 );
+
source->length = VIPS_MIN( length, G_MAXSSIZE );
}

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <[email protected]>
Date: Tue, 22 Dec 2020 11:19:09 +0100
Subject: [PATCH 2/2] Avoid seeking on bad file descriptors


diff --git a/libvips/iofuncs/source.c b/libvips/iofuncs/source.c
index 1111111..2222222 100644
--- a/libvips/iofuncs/source.c
+++ b/libvips/iofuncs/source.c
@@ -348,16 +348,15 @@ vips_source_seek_real( VipsSource *source, gint64 offset, int whence )
{
VipsConnection *connection = VIPS_CONNECTION( source );

- gint64 new_pos;
-
VIPS_DEBUG_MSG( "vips_source_seek_real:\n" );

/* Like _read_real(), we must not set a vips_error. We need to use the
* vips__seek() wrapper so we can seek long files on Windows.
*/
- new_pos = vips__seek_no_error( connection->descriptor, offset, whence );
+ if( connection->descriptor != -1 )
+ return( vips__seek_no_error( connection->descriptor, offset, whence ) );

- return( new_pos );
+ return( -1 );
}

static void

0 comments on commit 131a9d0

Please sign in to comment.