commit | 1d3e286c7f3b8ad7cc492c4914756af59262a39b | [log] [tgz] |
---|---|---|
author | Henrik Lundin <henrik.lundin@webrtc.org> | Wed Jan 31 15:22:13 2024 |
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 31 17:38:30 2024 |
tree | 60d9970d3afbfa4c298d076423249273fb51e72a | |
parent | 26ad5b82ce6b6feae7fe92bc549e8f4730edf436 [diff] |
Fix a fuzzer-found issue in G.722 decoder Bug: chromium:1521407 Change-Id: I913108232f195856a9e2693dc1350ec0937fa923 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337182 Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41647}
diff --git a/modules/audio_coding/codecs/g722/audio_decoder_g722.cc b/modules/audio_coding/codecs/g722/audio_decoder_g722.cc index e969ed1..bca47ce 100644 --- a/modules/audio_coding/codecs/g722/audio_decoder_g722.cc +++ b/modules/audio_coding/codecs/g722/audio_decoder_g722.cc
@@ -63,6 +63,11 @@ return static_cast<int>(2 * encoded_len / Channels()); } +int AudioDecoderG722Impl::PacketDurationRedundant(const uint8_t* encoded, + size_t encoded_len) const { + return PacketDuration(encoded, encoded_len); +} + int AudioDecoderG722Impl::SampleRateHz() const { return 16000; }
diff --git a/modules/audio_coding/codecs/g722/audio_decoder_g722.h b/modules/audio_coding/codecs/g722/audio_decoder_g722.h index 5872fad..e7083c3 100644 --- a/modules/audio_coding/codecs/g722/audio_decoder_g722.h +++ b/modules/audio_coding/codecs/g722/audio_decoder_g722.h
@@ -30,6 +30,8 @@ std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload, uint32_t timestamp) override; int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override; + int PacketDurationRedundant(const uint8_t* encoded, + size_t encoded_len) const override; int SampleRateHz() const override; size_t Channels() const override;