|
|
Created:
4 years ago by peah-webrtc Modified:
4 years ago Reviewers:
ivoc CC:
webrtc-reviews_webrtc.org, peah-webrtc, Andrew MacDonald, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, kwiberg-webrtc, minyue-webrtc, the sun, aluebs-webrtc, bjornv1 Target Ref:
refs/pending/heads/master Project:
webrtc Visibility:
Public. |
DescriptionCorrected access of null pointer in audioproc_f:
The previous CL that added the ability to add
and artificial nearend signal had an issue with
null pointer access.
This is addressed in this CL.
BUG=webrtc:6018
Committed: https://crrev.com/9e1e6c599dc0d911fe1888b8a1788a3e1d73117b
Cr-Commit-Position: refs/heads/master@{#15600}
Patch Set 1 #
Total comments: 3
Messages
Total messages: 13 (6 generated)
Description was changed from ========== Corrected access of null pointer Corrected access of null pointer BUG= ========== to ========== Corrected access of null pointer in audioproc_f: The previous CL that added the ability to add and artificial nearend signal had an issue with null pointer access. This is addressed in this CL. BUG=webrtc:6018 ==========
peah@webrtc.org changed reviewers: + ivoc@webrtc.org
ivoc@: PTAL Thanks!
https://codereview.webrtc.org/2573033003/diff/1/webrtc/modules/audio_processi... File webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc (right): https://codereview.webrtc.org/2573033003/diff/1/webrtc/modules/audio_processi... webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc:237: rtc::CheckedDivExact(sample_rate_hz, kChunksPerSecond), 1)); Maybe I'm missing something, but to me it looks like this statement is exactly the same (minus formatting) as before the change. How does this prevent access of a nullptr?
https://codereview.webrtc.org/2573033003/diff/1/webrtc/modules/audio_processi... File webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc (right): https://codereview.webrtc.org/2573033003/diff/1/webrtc/modules/audio_processi... webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc:237: rtc::CheckedDivExact(sample_rate_hz, kChunksPerSecond), 1)); On 2016/12/14 10:26:41, ivoc wrote: > Maybe I'm missing something, but to me it looks like this statement is exactly > the same (minus formatting) as before the change. How does this prevent access > of a nullptr? I think what happens is that the pointer artificial_nearend_file is lost in the std::move() operation on row 235, which in turn makes the call to artificial_nearend_file->sample_rate() access an invalid pointer. But please correct me if I'm wrong in that and that something else was wrong. The former code fails when I run it, and the new code does not fail.
LGTM https://codereview.webrtc.org/2573033003/diff/1/webrtc/modules/audio_processi... File webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc (right): https://codereview.webrtc.org/2573033003/diff/1/webrtc/modules/audio_processi... webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc:237: rtc::CheckedDivExact(sample_rate_hz, kChunksPerSecond), 1)); On 2016/12/14 10:33:40, peah-webrtc wrote: > On 2016/12/14 10:26:41, ivoc wrote: > > Maybe I'm missing something, but to me it looks like this statement is exactly > > the same (minus formatting) as before the change. How does this prevent access > > of a nullptr? > > I think what happens is that the pointer artificial_nearend_file is lost in the > std::move() operation on row 235, which in turn makes the call to > artificial_nearend_file->sample_rate() access an invalid pointer. > > But please correct me if I'm wrong in that and that something else was wrong. > The former code fails when I run it, and the new code does not fail. Ah right, that's a good point. It's easy to forget the effect of std::move (I guess that's why it was missed in the initial CL).
The CQ bit was checked by peah@webrtc.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
CQ is committing da patch. Bot data: {"patchset_id": 1, "attempt_start_ts": 1481713031432030, "parent_rev": "fdecee31bca990958db8f9327ff42f0c061351a8", "commit_rev": "22ab230690d8cae64ac1fded32c1024ec8f92d95"}
Message was sent while issue was closed.
Description was changed from ========== Corrected access of null pointer in audioproc_f: The previous CL that added the ability to add and artificial nearend signal had an issue with null pointer access. This is addressed in this CL. BUG=webrtc:6018 ========== to ========== Corrected access of null pointer in audioproc_f: The previous CL that added the ability to add and artificial nearend signal had an issue with null pointer access. This is addressed in this CL. BUG=webrtc:6018 Review-Url: https://codereview.webrtc.org/2573033003 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Corrected access of null pointer in audioproc_f: The previous CL that added the ability to add and artificial nearend signal had an issue with null pointer access. This is addressed in this CL. BUG=webrtc:6018 Review-Url: https://codereview.webrtc.org/2573033003 ========== to ========== Corrected access of null pointer in audioproc_f: The previous CL that added the ability to add and artificial nearend signal had an issue with null pointer access. This is addressed in this CL. BUG=webrtc:6018 Committed: https://crrev.com/9e1e6c599dc0d911fe1888b8a1788a3e1d73117b Cr-Commit-Position: refs/heads/master@{#15600} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/9e1e6c599dc0d911fe1888b8a1788a3e1d73117b Cr-Commit-Position: refs/heads/master@{#15600} |