diff -r e77095ade618 -r 65deccd64f3a src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp --- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp Thu Feb 14 15:12:17 2019 -0800 +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp Thu Feb 14 15:17:03 2019 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -238,9 +238,8 @@ assert(_thread_group_name == NULL, "invariant"); if (tgname != NULL) { size_t len = strlen(tgname); - _thread_group_name = JfrCHeapObj::new_array(len+1); - strncpy(_thread_group_name, tgname, len); - _thread_group_name[len] = '\0'; + _thread_group_name = JfrCHeapObj::new_array(len + 1); + strncpy(_thread_group_name, tgname, len + 1); } }