aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2021-03-16 14:51:32 +0100
committerJean-Michel Trivi <jmtrivi@google.com>2021-05-07 12:44:00 -0700
commitc2416f5e9360db0a6a3578fff087392fc7656f38 (patch)
treea6dceaf07cea85442326ca2c42b05022a6b977d0
parent2a40fde39dfcc264e1cda3c429b482246621e60c (diff)
downloadfdk-aac-c2416f5e9360db0a6a3578fff087392fc7656f38.tar.gz
fdk-aac-c2416f5e9360db0a6a3578fff087392fc7656f38.tar.bz2
fdk-aac-c2416f5e9360db0a6a3578fff087392fc7656f38.zip
Add parameter pointer check to aacEncInfo() encoder API function.
Bug: 186777497 Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc Change-Id: I5d758d2708a613382d9ad6d02a9dbe46ae2ef0cf
-rw-r--r--documentation/aacEncoder.pdfbin443728 -> 443831 bytes
-rw-r--r--libAACenc/include/aacenc_lib.h4
-rw-r--r--libAACenc/src/aacenc_lib.cpp7
3 files changed, 8 insertions, 3 deletions
diff --git a/documentation/aacEncoder.pdf b/documentation/aacEncoder.pdf
index 77b8f4c..a47708a 100644
--- a/documentation/aacEncoder.pdf
+++ b/documentation/aacEncoder.pdf
Binary files differ
diff --git a/libAACenc/include/aacenc_lib.h b/libAACenc/include/aacenc_lib.h
index 71f7556..f0f23b4 100644
--- a/libAACenc/include/aacenc_lib.h
+++ b/libAACenc/include/aacenc_lib.h
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten
+© Copyright 1995 - 2021 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@@ -1643,7 +1643,7 @@ AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder,
*
* \return
* - AACENC_OK, on succes.
- * - AACENC_INIT_ERROR, on failure.
+ * - AACENC_INVALID_HANDLE, AACENC_INIT_ERROR, on failure.
*/
AACENC_ERROR aacEncInfo(const HANDLE_AACENCODER hAacEncoder,
AACENC_InfoStruct *pInfo);
diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp
index caa62c5..c11db27 100644
--- a/libAACenc/src/aacenc_lib.cpp
+++ b/libAACenc/src/aacenc_lib.cpp
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten
+© Copyright 1995 - 2021 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@@ -2521,6 +2521,11 @@ AACENC_ERROR aacEncInfo(const HANDLE_AACENCODER hAacEncoder,
AACENC_InfoStruct *pInfo) {
AACENC_ERROR err = AACENC_OK;
+ if ((hAacEncoder == NULL) || (pInfo == NULL)) {
+ err = AACENC_INVALID_HANDLE;
+ goto bail;
+ }
+
FDKmemclear(pInfo, sizeof(AACENC_InfoStruct));
pInfo->confSize = 64; /* pre-initialize */