From c1caf18b58cd95e896fbb5a0e5f4dcbb687427b8 Mon Sep 17 00:00:00 2001
From: Milanka Ringwald <mila@ringwald.ch>
Date: Tue, 18 Feb 2025 15:19:20 +0100
Subject: [PATCH] avdtp_util: check DRC for

---
 src/classic/avdtp_util.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/classic/avdtp_util.c b/src/classic/avdtp_util.c
index 938f06825..6030a122c 100644
--- a/src/classic/avdtp_util.c
+++ b/src/classic/avdtp_util.c
@@ -1243,6 +1243,9 @@ avdtp_signaling_setup_media_codec_mpec_aac_config_event(uint8_t *event, uint16_t
     if (count_set_bits_uint32(object_type_bitmap) != 1) {
         return CODEC_SPECIFIC_ERROR_CODE_INVALID_OBJECT_TYPE;
     }
+    if ( (object_type_bitmap & 0x40) && (drc != 0u)){
+        return CODEC_SPECIFIC_ERROR_CODE_INVALID_DRC;
+    }
     if (count_set_bits_uint32(sampling_frequency_bitmap) != 1){
         return CODEC_SPECIFIC_ERROR_CODE_INVALID_SAMPLING_FREQUENCY;
     }