Fix Windows build by using OS::StrNCpy.
Fix lint issue in lineprocessor.cc. TBR=peter.rybin Review URL: http://codereview.chromium.org/549081 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
6f91d1bfd6
commit
00b6a335b0
@ -404,8 +404,8 @@ v8::Handle<v8::Value> ReadLine(const v8::Arguments& args) {
|
||||
}
|
||||
|
||||
v8::Handle<v8::String> ReadLine() {
|
||||
const int buffer_size = 1024 + 1;
|
||||
char buffer[buffer_size];
|
||||
const int kBufferSize = 1024 + 1;
|
||||
char buffer[kBufferSize];
|
||||
|
||||
char* res;
|
||||
{
|
||||
|
@ -2202,7 +2202,8 @@ bool GetEvaluateStringResult(char *message, char* buffer, int buffer_size) {
|
||||
if (pos == NULL) {
|
||||
return false;
|
||||
}
|
||||
strncpy(buffer, pos, buffer_size);
|
||||
Vector<char> buf(buffer, buffer_size);
|
||||
OS::StrNCpy(buf, pos, buffer_size);
|
||||
buffer[buffer_size - 1] = '\0';
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user