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

Unified Diff: src/v8utils.cc

Issue 14018010: Fix OOB write in --print-code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « src/utils.cc ('k') | test/mjsunit/regress/regress-2624.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8utils.cc
diff --git a/src/v8utils.cc b/src/v8utils.cc
index 58ad4e5edd5262b7dba1e67c769250e090ac3af1..8d97f54b81f40765b900310da4c120116846397f 100644
--- a/src/v8utils.cc
+++ b/src/v8utils.cc
@@ -264,7 +264,7 @@ void StringBuilder::AddFormatted(const char* format, ...) {
void StringBuilder::AddFormattedList(const char* format, va_list list) {
- ASSERT(!is_finalized() && position_ < buffer_.length());
+ ASSERT(!is_finalized() && position_ <= buffer_.length());
int n = OS::VSNPrintF(buffer_ + position_, format, list);
if (n < 0 || n >= (buffer_.length() - position_)) {
position_ = buffer_.length();
« no previous file with comments | « src/utils.cc ('k') | test/mjsunit/regress/regress-2624.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698