Fix buffer overflow in liveedit.

Make sure that there is always room for RelocInfoWriter::kMaxSize
bytes in the buffer before writing to it. We only ensured space for 8
bytes, but relocation information can be up to 16 bytes in x64.

Review URL: http://codereview.chromium.org/2100010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ager@chromium.org 2010-05-20 08:59:36 +00:00
parent 393a26b17e
commit af70ad5fdc

View File

@ -988,7 +988,7 @@ class RelocInfoBuffer {
byte* buffer_;
int buffer_size_;
static const int kBufferGap = 8;
static const int kBufferGap = RelocInfoWriter::kMaxSize;
static const int kMaximalBufferSize = 512*MB;
};