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 7733d33a28a99ebf8388973bdcc9140c5730ce73..325be42f9371323ea24d03510d05c29dc2ee0340 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,11 +49,9 @@ 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) ? dataLengthInBytes : numBytes; |
- if (dataNumBytes > dataLengthInBytes) { |
+ int dataNumBytes = (numBytes == -1) ? data.lengthInBytes : numBytes; |
+ if (dataNumBytes > data.lengthInBytes) { |
status = MojoResult.INVALID_ARGUMENT; |
return status; |
} |