| Index: ppapi/native_client/src/shared/ppapi_proxy/object_serialize.cc
|
| ===================================================================
|
| --- ppapi/native_client/src/shared/ppapi_proxy/object_serialize.cc (revision 117568)
|
| +++ ppapi/native_client/src/shared/ppapi_proxy/object_serialize.cc (working copy)
|
| @@ -464,7 +464,7 @@
|
| }
|
|
|
| char* Serialize(const PP_Var* vars, uint32_t argc, uint32_t* length) {
|
| - // Length needs to be set.
|
| + // Length needs to be returnable.
|
| if (NULL == length) {
|
| return NULL;
|
| }
|
| @@ -479,10 +479,10 @@
|
| }
|
| // Compute the size of the buffer. Zero indicates error.
|
| uint32_t tmp_length = PpVarVectorSize(vars, argc);
|
| - if (0 == tmp_length || tmp_length > *length) {
|
| + if (0 == tmp_length) {
|
| return NULL;
|
| }
|
| - // Allocate the buffer, if the client didn't pass one.
|
| + // Allocate the buffer.
|
| char* bytes = new char[tmp_length];
|
| if (NULL == bytes) {
|
| return NULL;
|
|
|