From 9e6a80158e9a58903ddd4faa18bd3c7215a2ccda Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 28 Apr 2005 14:50:43 +0000 Subject: [PATCH] Refuse AAC codec data where the profile id is 0. --- src/common/aac_common.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/aac_common.cpp b/src/common/aac_common.cpp index f2c94323c..12ff850c8 100644 --- a/src/common/aac_common.cpp +++ b/src/common/aac_common.cpp @@ -217,7 +217,10 @@ parse_aac_data(unsigned char *data, mxverb(4, "%02x ", data[i]); mxverb(4, "\n"); - profile = (data[0] >> 3) - 1; + profile = data[0] >> 3; + if (0 == profile) + return false; + --profile; sample_rate = aac_sampling_freq[((data[0] & 0x07) << 1) | (data[1] >> 7)]; channels = (data[1] & 0x7f) >> 3; if (size == 5) {