Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1564)

Unified Diff: webrtc/modules/video_coding/main/source/session_info.cc

Issue 1238033003: Prevent OOB reads for truncated H264 STAP-A packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: added logging + todos Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/main/source/session_info.cc
diff --git a/webrtc/modules/video_coding/main/source/session_info.cc b/webrtc/modules/video_coding/main/source/session_info.cc
index 8eba432643ce0164614f9bc82c412c399efbeaaa..49839e5dff3ce575aaddb1643291ba5c7d1f1f44 100644
--- a/webrtc/modules/video_coding/main/source/session_info.cc
+++ b/webrtc/modules/video_coding/main/source/session_info.cc
@@ -133,6 +133,8 @@ size_t VCMSessionInfo::InsertBuffer(uint8_t* frame_buffer,
// We handle H.264 STAP-A packets in a special way as we need to remove the
// two length bytes between each NAL unit, and potentially add start codes.
+ // TODO(pbos): Remove H264 parsing from this step and use a fragmentation
+ // header supplied by the H264 depacketizer.
const size_t kH264NALHeaderLengthInBytes = 1;
const size_t kLengthFieldLength = 2;
if (packet.codecSpecificHeader.codec == kRtpVideoH264 &&
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698