dart-archive / isolate

Makes working with Dart isolates easier.
https://pub.dev/packages/isolate
BSD 3-Clause "New" or "Revised" License
90 stars 34 forks source link

Invalid Index on IsolateRunner.kill #32

Closed brettmeemo closed 5 years ago

brettmeemo commented 5 years ago

If IsolateRunner.kill() is called without setting the timeout duration to 0 seconds, then _commandPort.send(list1(_SHUTDOWN)); is called. However, _handleCommand in IsolateRunnerRemote expects the list to have length of at least 2, so SendPort responsePort = command[1]; is an invalid access which causes a crash.

lrhn commented 5 years ago

Fixed.