Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2b2c0fba9 | ||
|
|
7a31bdd748 |
2 changed files with 41 additions and 4 deletions
28
vips-zero-memory-on-malloc.patch
Normal file
28
vips-zero-memory-on-malloc.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
Zero memory on malloc to prevent write of uninit memory under some error
|
||||
conditions.
|
||||
|
||||
diff --git a/libvips/iofuncs/memory.c b/libvips/iofuncs/memory.c
|
||||
index d877e2e0..9f9b55f8 100644
|
||||
--- a/libvips/iofuncs/memory.c
|
||||
+++ b/libvips/iofuncs/memory.c
|
||||
@@ -173,7 +173,7 @@ vips_malloc( VipsObject *object, size_t size )
|
||||
{
|
||||
void *buf;
|
||||
|
||||
- buf = g_malloc( size );
|
||||
+ buf = g_malloc0( size );
|
||||
|
||||
if( object ) {
|
||||
g_signal_connect( object, "postclose",
|
||||
@@ -317,7 +317,7 @@ vips_tracked_malloc( size_t size )
|
||||
*/
|
||||
size += 16;
|
||||
|
||||
- if( !(buf = g_try_malloc( size )) ) {
|
||||
+ if( !(buf = g_try_malloc0( size )) ) {
|
||||
#ifdef DEBUG
|
||||
g_assert_not_reached();
|
||||
#endif /*DEBUG*/
|
||||
--
|
||||
2.20.1
|
||||
|
||||
17
vips.spec
17
vips.spec
|
|
@ -4,12 +4,16 @@
|
|||
|
||||
Name: vips
|
||||
Version: %{vips_version}
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: C/C++ library for processing large images
|
||||
|
||||
License: LGPLv2+
|
||||
URL: https://jcupitt.github.io/libvips/
|
||||
Source0: https://github.com/jcupitt/libvips/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
URL: https://libvips.github.io/libvips/
|
||||
Source0: https://github.com/libvips/libvips/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# Fix write of uninit memory under some error conditions
|
||||
# 00622428bda8d7521db8d74260b519fa41d69d0a upstream
|
||||
Patch0: vips-zero-memory-on-malloc.patch
|
||||
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||
|
|
@ -111,6 +115,7 @@ HTML and PDF formats.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
# Avoid setting RPATH to /usr/lib64 on 64-bit builds
|
||||
# The DIE_RPATH_DIE trick breaks the build wrt gobject-introspection
|
||||
|
|
@ -119,7 +124,7 @@ sed -i 's|sys_lib_dlsearch_path_spec="|sys_lib_dlsearch_path_spec="/%{_lib} %{_l
|
|||
|
||||
%build
|
||||
# Upstream recommends enabling auto-vectorization of inner loops:
|
||||
# https://github.com/jcupitt/libvips/pull/212#issuecomment-68177930
|
||||
# https://github.com/libvips/libvips/pull/212#issuecomment-68177930
|
||||
export CFLAGS="%{optflags} -ftree-vectorize"
|
||||
export CXXFLAGS="%{optflags} -ftree-vectorize"
|
||||
%configure --disable-static --enable-gtk-doc --enable-pyvips7 --enable-pyvips8 PYTHON=%{_bindir}/python2
|
||||
|
|
@ -182,6 +187,10 @@ find ${RPM_BUILD_ROOT}%{python3_sitearch} \
|
|||
|
||||
|
||||
%changelog
|
||||
* Sat Jan 19 2019 Benjamin Gilbert <bgilbert@backtick.net> - 8.6.5-3
|
||||
- Fix write of uninit memory under some error conditions
|
||||
- Update package URLs
|
||||
|
||||
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 8.6.5-2
|
||||
- Rebuild with fixed binutils
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue