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

Unified Diff: webrtc/common_types.cc

Issue 2915913003: Prevent memory corruption by StreamId::Set (Closed)
Patch Set: CR response Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_types.cc
diff --git a/webrtc/common_types.cc b/webrtc/common_types.cc
index b9c4737aeb511627bd1b3697269ef047d8a11ad1..c9f7fa1e738fbbd1b61b704bb5d4458667a49e5d 100644
--- a/webrtc/common_types.cc
+++ b/webrtc/common_types.cc
@@ -25,7 +25,7 @@ constexpr size_t StreamId::kMaxSize;
void StreamId::Set(const char* data, size_t size) {
// If |data| contains \0, the stream id size might become less than |size|.
- RTC_DCHECK_LE(size, kMaxSize);
+ RTC_CHECK_LE(size, kMaxSize);
memcpy(value_, data, size);
if (size < kMaxSize)
value_[size] = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698