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

Unified Diff: media/formats/webm/webm_parser.cc

Issue 516283004: Do not access an invalidated reference in media::WebMListParser::OnListEnd(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: media/formats/webm/webm_parser.cc
diff --git a/media/formats/webm/webm_parser.cc b/media/formats/webm/webm_parser.cc
index 35cf909fe87381f40269e5f6ea051598c6f09dea..fda287c0d90aa0dbdbdf65393dbe34e9d3f7612c 100644
--- a/media/formats/webm/webm_parser.cc
+++ b/media/formats/webm/webm_parser.cc
@@ -907,13 +907,14 @@ bool WebMListParser::OnListEnd() {
int lists_ended = 0;
for (; !list_state_stack_.empty(); ++lists_ended) {
const ListState& list_state = list_state_stack_.back();
+ int64 bytes_parsed = list_state.bytes_parsed_;
+ int id = list_state.id_;
- if (list_state.bytes_parsed_ != list_state.size_)
+ if (bytes_parsed != list_state.size_)
break;
list_state_stack_.pop_back();
- int64 bytes_parsed = list_state.bytes_parsed_;
WebMParserClient* client = NULL;
if (!list_state_stack_.empty()) {
// Update the bytes_parsed_ for the parent element.
@@ -923,7 +924,7 @@ bool WebMListParser::OnListEnd() {
client = root_client_;
}
- if (!client->OnListEnd(list_state.id_))
+ if (!client->OnListEnd(id))
return false;
}
« 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