Fix fuzzer build failures on Windows
Fix the following issues with fuzz targets when built on Windows: 1. Fix audio_processing_fuzzer by making types match in invocations of CheckedDivExact by explicitly casting to size_t. 2. Fix packet_buffer_fuzzer by including "frame_object.h" for declaration of RtpFrameObject. 3. Fix rtcp_receiver_fuzzer by including "tmmb_item.h" for declaration of TmmbItem. Bug: chromium:891867 Change-Id: Iddc338360ca37d5fc31488ec908eb4cdb5cc7b94 Reviewed-on: https://webrtc-review.googlesource.com/c/103844 Commit-Queue: Jonathan Metzman <metzman@chromium.org> Reviewed-by: Alex Loiko <aleloi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25028}
This commit is contained in:
committed by
Commit Bot
parent
4d6f605123
commit
9f80b97309
@ -218,6 +218,7 @@ webrtc_fuzzer_test("rtcp_receiver_fuzzer") {
|
||||
]
|
||||
deps = [
|
||||
"../../modules/rtp_rtcp",
|
||||
"../../modules/rtp_rtcp:rtp_rtcp_format",
|
||||
"../../rtc_base:checks",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../system_wrappers:system_wrappers",
|
||||
|
||||
@ -30,7 +30,7 @@ void GenerateFloatFrame(test::FuzzDataHelper* fuzz_data,
|
||||
size_t num_channels,
|
||||
float* const* float_frames) {
|
||||
const size_t samples_per_input_channel =
|
||||
rtc::CheckedDivExact(input_rate, 100ul);
|
||||
rtc::CheckedDivExact(input_rate, static_cast<size_t>(100));
|
||||
RTC_DCHECK_LE(samples_per_input_channel, 480);
|
||||
for (size_t i = 0; i < num_channels; ++i) {
|
||||
std::fill(float_frames[i], float_frames[i] + samples_per_input_channel, 0);
|
||||
@ -55,7 +55,7 @@ void GenerateFixedFrame(test::FuzzDataHelper* fuzz_data,
|
||||
size_t num_channels,
|
||||
AudioFrame* fixed_frame) {
|
||||
const size_t samples_per_input_channel =
|
||||
rtc::CheckedDivExact(input_rate, 100ul);
|
||||
rtc::CheckedDivExact(input_rate, static_cast<size_t>(100));
|
||||
fixed_frame->samples_per_channel_ = samples_per_input_channel;
|
||||
fixed_frame->sample_rate_hz_ = input_rate;
|
||||
fixed_frame->num_channels_ = num_channels;
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "modules/video_coding/frame_object.h"
|
||||
#include "modules/video_coding/packet_buffer.h"
|
||||
#include "system_wrappers/include/clock.h"
|
||||
#include "test/fuzzers/fuzz_data_helper.h"
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
|
||||
#include "modules/rtp_rtcp/source/rtcp_receiver.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "system_wrappers/include/clock.h"
|
||||
|
||||
Reference in New Issue
Block a user