changeset 33794 | 41ef3dc95179 |
parent 25468 | 5331df506290 |
child 40625 | 6b45fb9188f9 |
--- a/hotspot/src/os/linux/vm/attachListener_linux.cpp Mon Nov 09 11:35:45 2015 +0000 +++ b/hotspot/src/os/linux/vm/attachListener_linux.cpp Mon Oct 26 16:21:37 2015 +0100 @@ -254,6 +254,8 @@ do { int n; RESTARTABLE(read(s, buf+off, left), n); + assert(n <= left, "buffer was too small, impossible!"); + buf[max_len - 1] = '\0'; if (n == -1) { return NULL; // reset by peer or other error }