diff options
author | Leo <thinkabit.ukim@gmail.com> | 2020-02-26 21:45:44 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-02-26 23:36:04 -0300 |
commit | 9c249acf0f40dfa27c7b4c1875b02c4996489dea (patch) | |
tree | 908a3d76041f60faf5ed737e0a5bc0b35d523676 /community/sdl2_image | |
parent | 25bb9088a3d304eef72545b3b9777a25f758c6a7 (diff) | |
download | aports-9c249acf0f40dfa27c7b4c1875b02c4996489dea.tar.bz2 aports-9c249acf0f40dfa27c7b4c1875b02c4996489dea.tar.xz |
community/sdl2_image: move from main
Diffstat (limited to 'community/sdl2_image')
-rw-r--r-- | community/sdl2_image/APKBUILD | 56 | ||||
-rw-r--r-- | community/sdl2_image/CVE-2019-13616.patch | 24 |
2 files changed, 80 insertions, 0 deletions
diff --git a/community/sdl2_image/APKBUILD b/community/sdl2_image/APKBUILD new file mode 100644 index 0000000000..f262cbaa21 --- /dev/null +++ b/community/sdl2_image/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=sdl2_image +pkgver=2.0.5 +pkgrel=1 +_pkgname=SDL2_image +pkgdesc="A simple library to load images of various formats as SDL surfaces" +url="http://www.libsdl.org/projects/SDL_image/" +arch="all" +license="zlib" +makedepends="sdl2-dev libpng-dev libjpeg-turbo-dev + libwebp-dev tiff-dev zlib-dev" +subpackages="$pkgname-dev" +source="https://www.libsdl.org/projects/SDL_image/release/$_pkgname-$pkgver.tar.gz + CVE-2019-13616.patch" +builddir="$srcdir/$_pkgname-$pkgver" + +# secfixes: +# 2.0.5-r1: +# - CVE-2019-13616 +# 2.0.3-r0: +# - CVE-2017-12122 TALOS-2017-0488 +# - CVE-2017-14440 TALOS-2017-0489 +# - CVE-2017-14441 TALOS-2017-0490 +# - CVE-2017-14442 TALOS-2017-0491 +# - CVE-2017-14448 TALOS-2017-0497 +# - CVE-2017-14449 TALOS-2017-0498 +# - CVE-2017-14450 TALOS-2017-0499 + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --disable-static \ + --enable-png \ + --enable-png-shared \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="77e743d3f32707e015b290c1379ae3c7d7a3fe265995713267f0d0ec6517de4808f0de9890b5ab28445941af5bc9fbff346620629e0d7d7e9f365262cab05ee7 SDL2_image-2.0.5.tar.gz +777f2c88efd7ead1d0d590bb08db02f8f532bd4b8acf88d5e956e3738accbba08b5d152eba3f97673a970dda1f95fdd2eb155595d158249907f9b181975d8a96 CVE-2019-13616.patch" diff --git a/community/sdl2_image/CVE-2019-13616.patch b/community/sdl2_image/CVE-2019-13616.patch new file mode 100644 index 0000000000..cb0fe87a38 --- /dev/null +++ b/community/sdl2_image/CVE-2019-13616.patch @@ -0,0 +1,24 @@ + +# HG changeset patch +# User Sam Lantinga <slouken@libsdl.org> +# Date 1564509612 25200 +# Node ID ba45f00879ba0b957780e1fd28304c41503c1737 +# Parent f1baffa48926c4c76f482f21a240667e9159d1d5 +Fixed bug 4538 - validate image size when loading BMP files + +diff -r f1baffa48926 -r ba45f00879ba IMG_bmp.c +--- a/IMG_bmp.c Tue Jul 30 10:16:02 2019 -0700 ++++ b/IMG_bmp.c Tue Jul 30 11:00:12 2019 -0700 +@@ -351,6 +351,11 @@ + SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR); + } + } ++ if (biWidth <= 0 || biHeight == 0) { ++ IMG_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight); ++ was_error = SDL_TRUE; ++ goto done; ++ } + if (biHeight < 0) { + topDown = SDL_TRUE; + biHeight = -biHeight; + |