Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
From 0a4cd796df5b030cb866f3f4a5e41a4b92caddf5 Mon Sep 17 00:00:00 2001
|
||||
From: Ralph Giles <giles@thaumas.net>
|
||||
Date: Tue, 6 Sep 2022 19:04:31 -0700
|
||||
Subject: [PATCH] Propagate allocation failure from ogg_sync_buffer.
|
||||
|
||||
Instead of segfault, report OP_EFAULT if ogg_sync_buffer returns
|
||||
a null pointer. This allows more graceful recovery by the caller
|
||||
in the unlikely event of a fallible ogg_malloc call.
|
||||
|
||||
We do check the return value elsewhere in the code, so the new
|
||||
checks make the code more consistent.
|
||||
|
||||
Thanks to https://github.com/xiph/opusfile/issues/36 for reporting.
|
||||
|
||||
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
|
||||
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
|
||||
|
||||
CVE: CVE-2022-47021
|
||||
[Retrieved from:
|
||||
https://github.com/xiph/opusfile/commit/0a4cd796df5b030cb866f3f4a5e41a4b92caddf5]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
src/opusfile.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/opusfile.c b/src/opusfile.c
|
||||
index ca219b2..3c3c81e 100644
|
||||
--- a/src/opusfile.c
|
||||
+++ b/src/opusfile.c
|
||||
@@ -148,6 +148,7 @@ static int op_get_data(OggOpusFile *_of,int _nbytes){
|
||||
int nbytes;
|
||||
OP_ASSERT(_nbytes>0);
|
||||
buffer=(unsigned char *)ogg_sync_buffer(&_of->oy,_nbytes);
|
||||
+ if(OP_UNLIKELY(buffer==NULL))return OP_EFAULT;
|
||||
nbytes=(int)(*_of->callbacks.read)(_of->stream,buffer,_nbytes);
|
||||
OP_ASSERT(nbytes<=_nbytes);
|
||||
if(OP_LIKELY(nbytes>0))ogg_sync_wrote(&_of->oy,nbytes);
|
||||
@@ -1527,6 +1528,7 @@ static int op_open1(OggOpusFile *_of,
|
||||
if(_initial_bytes>0){
|
||||
char *buffer;
|
||||
buffer=ogg_sync_buffer(&_of->oy,(long)_initial_bytes);
|
||||
+ if(OP_UNLIKELY(buffer==NULL))return OP_EFAULT;
|
||||
memcpy(buffer,_initial_data,_initial_bytes*sizeof(*buffer));
|
||||
ogg_sync_wrote(&_of->oy,(long)_initial_bytes);
|
||||
}
|
||||
9
package/opusfile/Config.in
Normal file
9
package/opusfile/Config.in
Normal file
@@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_OPUSFILE
|
||||
bool "opusfile"
|
||||
select BR2_PACKAGE_LIBOGG
|
||||
select BR2_PACKAGE_OPUS
|
||||
help
|
||||
A convenient high-level API for decoding and basic
|
||||
manipulation of all Ogg Opus audio streams.
|
||||
|
||||
http://opus-codec.org
|
||||
5
package/opusfile/opusfile.hash
Normal file
5
package/opusfile/opusfile.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# From http://downloads.xiph.org/releases/opus/SHA256SUMS.txt
|
||||
sha256 118d8601c12dd6a44f52423e68ca9083cc9f2bfe72da7a8c1acb22a80ae3550b opusfile-0.12.tar.gz
|
||||
|
||||
# Hash for license file
|
||||
sha256 0267ae795ab744c4e0f9c45e249440fdf2e75dac8c804f36066b28649bf74aaf COPYING
|
||||
29
package/opusfile/opusfile.mk
Normal file
29
package/opusfile/opusfile.mk
Normal file
@@ -0,0 +1,29 @@
|
||||
################################################################################
|
||||
#
|
||||
# opusfile
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPUSFILE_VERSION = 0.12
|
||||
OPUSFILE_SITE = https://downloads.xiph.org/releases/opus
|
||||
OPUSFILE_DEPENDENCIES = host-pkgconf libogg opus
|
||||
OPUSFILE_LICENSE = BSD-3-Clause
|
||||
OPUSFILE_LICENSE_FILES = COPYING
|
||||
OPUSFILE_CPE_ID_VENDOR = xiph
|
||||
OPUSFILE_INSTALL_STAGING = YES
|
||||
|
||||
# 0001-Propagate-allocation-failure-from-ogg_sync_buffer.patch
|
||||
OPUSFILE_IGNORE_CVES += CVE-2022-47021
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
OPUSFILE_DEPENDENCIES += openssl
|
||||
else
|
||||
OPUSFILE_CONF_OPTS += --disable-http
|
||||
endif
|
||||
|
||||
# Use the same as opus package since it's a dep and we can't mix
|
||||
ifeq ($(BR2_PACKAGE_OPUS_FIXED_POINT),y)
|
||||
OPUSFILE_CONF_OPTS += --enable-fixed-point
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user