From: Antonio Larrosa Date: Mon, 6 Mar 2017 18:02:31 +0100 Subject: clamp index values to fix index overflow in IMA.cpp This fixes #33 (also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=1026981 and https://blogs.gentoo.org/ago/2017/02/20/audiofile-global-buffer-overflow-in-decodesample-ima-cpp/) --- libaudiofile/modules/IMA.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libaudiofile/modules/IMA.cpp b/libaudiofile/modules/IMA.cpp index 7476d44..df4aad6 100644 --- a/libaudiofile/modules/IMA.cpp +++ b/libaudiofile/modules/IMA.cpp @@ -169,7 +169,7 @@ int IMA::decodeBlockWAVE(const uint8_t *encoded, int16_t *decoded) if (encoded[1] & 0x80) m_adpcmState[c].previousValue -= 0x10000; - m_adpcmState[c].index = encoded[2]; + m_adpcmState[c].index = clamp(encoded[2], 0, 88); *decoded++ = m_adpcmState[c].previousValue; @@ -210,7 +210,7 @@ int IMA::decodeBlockQT(const uint8_t *encoded, int16_t *decoded) predictor -= 0x10000; state.previousValue = clamp(predictor, MIN_INT16, MAX_INT16); - state.index = encoded[1] & 0x7f; + state.index = clamp(encoded[1] & 0x7f, 0, 88); encoded += 2; for (int n=0; nlogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-22etc: Add more SELinux permissions for the daemon.Marius Bakke
* etc/guix-daemon.cil.in (guix_daemon): Add more permissions, necessary for garbage collection.
2020-12-10etc: Add more SELinux permissions for the daemon.Marius Bakke
* etc/guix-daemon.cil.in (guix_daemon): Permit file write, getattr, link and unlink for the guix_daemon_exec_t type.
2020-11-27etc: Add more SELinux permissions for the daemon.Marius Bakke
* etc/guix-daemon.cil.in (guix_daemon): Permit more operations required for various build jobs.
2020-11-26etc: Add more SELinux permissions for the daemon.Marius Bakke
* etc/guix-daemon.cil.in (guix_daemon): Permit file appending, setattr, read/write UDP sockets, access to tmpfs and hugetlbfs, and connecting to PostgreSQL.
2020-11-25etc: Add more SELinux permissions for the daemon.Marius Bakke
This is needed for some package test suites. * etc/guix-daemon.cil.in (guix_daemon): Permit unix_dgram_socket operations.
2020-11-15etc: Updates for the guix-daemon SELinux policy.Daniel Brooks
* etc/guix-daemon.cil.in (guix_daemon): Specify more permissions for guix-daemon to account for daemon updates and newer SELinux. I can't promise that this is a complete list of everything that guix-daemon needs, but it's probably most of them. It can search for, install, upgrade, and remove packages, create virtual machines and containers, update itself, and so on. Signed-off-by: Marius Bakke <marius@gnu.org>