| Index: third_party/mojo/src/mojo/public/dart/src/message_pipe.dart
|
| diff --git a/third_party/mojo/src/mojo/public/dart/src/message_pipe.dart b/third_party/mojo/src/mojo/public/dart/src/message_pipe.dart
|
| index 325be42f9371323ea24d03510d05c29dc2ee0340..7733d33a28a99ebf8388973bdcc9140c5730ce73 100644
|
| --- a/third_party/mojo/src/mojo/public/dart/src/message_pipe.dart
|
| +++ b/third_party/mojo/src/mojo/public/dart/src/message_pipe.dart
|
| @@ -49,9 +49,11 @@ class MojoMessagePipeEndpoint {
|
| return status;
|
| }
|
|
|
| + int dataLengthInBytes = (data == null) ? 0 : data.lengthInBytes;
|
| +
|
| // If numBytes has the default value, use the full length of the data.
|
| - int dataNumBytes = (numBytes == -1) ? data.lengthInBytes : numBytes;
|
| - if (dataNumBytes > data.lengthInBytes) {
|
| + int dataNumBytes = (numBytes == -1) ? dataLengthInBytes : numBytes;
|
| + if (dataNumBytes > dataLengthInBytes) {
|
| status = MojoResult.INVALID_ARGUMENT;
|
| return status;
|
| }
|
|
|