| commit | 9b7f3649af2137347b84d49f202ab5662967baed | [log] [tgz] |
|---|---|---|
| author | Henrik Lundin <henrik.lundin@webrtc.org> | Wed Jan 31 13:15:00 2024 |
| committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 31 17:00:04 2024 |
| tree | 0af0f64dc8cda687ac1ef6984d4e5234a51e27a9 | |
| parent | 14b016fbf9b99c15edc8e9bb4732f7306cc3bad9 [diff] |
Fix a fuzzer-found issue in PCM16 decoder Bug: chromium:1521761 Change-Id: Id5292e80fd6ecae2c39a446dec010b0383bd805e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337200 Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41645}
diff --git a/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc b/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc index 7761efe..1e2b5db 100644 --- a/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc +++ b/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc
@@ -67,4 +67,9 @@ return static_cast<int>(encoded_len / (2 * Channels())); } +int AudioDecoderPcm16B::PacketDurationRedundant(const uint8_t* encoded, + size_t encoded_len) const { + return PacketDuration(encoded, encoded_len); +} + } // namespace webrtc
diff --git a/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h b/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h index 6f50161..c31cc5d 100644 --- a/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h +++ b/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h
@@ -32,6 +32,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;