Fix security issue

el8
Nicolas Chauvet 6 years ago
parent b7518ce88c
commit 6e1f3704c2

@ -0,0 +1,25 @@
--- faad2/libfaad/bits.c 2007-11-01 13:33:29.000000000 +0100
+++ faad2.new/libfaad/bits.c 2019-03-25 17:29:26.134199188 +0100
@@ -167,7 +167,10 @@
int words = bits >> 5;
int remainder = bits & 0x1F;
- ld->bytes_left = ld->buffer_size - words*4;
+ if (ld->buffer_size < words * 4)
+ ld->bytes_left = 0;
+ else
+ ld->bytes_left = ld->buffer_size - words*4;
if (ld->bytes_left >= 4)
{
--- faad2/libfaad/syntax.c 2019-03-25 17:57:36.930937066 +0100
+++ faad2.new/libfaad/syntax.c 2019-03-25 17:49:26.135368525 +0100
@@ -2292,6 +2292,8 @@
while ((drc->additional_excluded_chns[n-1] = faad_get1bit(ld
DEBUGVAR(1,104,"excluded_channels(): additional_excluded_chns"))) == 1)
{
+ if (i >= MAX_CHANNELS - num_excl_chan - 7)
+ return n;
for (i = num_excl_chan; i < num_excl_chan+7; i++)
{
drc->exclude_mask[i] = faad_get1bit(ld

@ -4,13 +4,15 @@ Summary: Library and frontend for decoding MPEG2/4 AAC
Name: faad2
Epoch: 1
Version: 2.8.8
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2+
URL: http://www.audiocoding.com/faad2.html
Source: http://downloads.sourceforge.net/sourceforge/faac/%{name}-%{version}.tar.gz
# fix non-PIC objects in libmp4ff.a
Patch0: %{name}-pic.patch
Patch1: fix_undefined_version.patch
# Security issue from videolan contribs
Patch2: faad2-fix-overflows.patch
BuildRequires: gcc-c++
BuildRequires: id3lib-devel
@ -98,6 +100,9 @@ find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
%{xmmsinputplugindir}/libmp4.so
%changelog
* Fri Jun 07 2019 Nicolas Chauvet <kwizart@gmail.com> - 1:2.8.8-6
- Fix overflows
* Mon Mar 04 2019 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 1:2.8.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

Loading…
Cancel
Save