# HG changeset patch # User sspitsyn # Date 1508364628 0 # Node ID e8a76ff6e1a44d033a6a7357dc0e82bae057dfd5 # Parent 80e75cbb08d60211f192a38f860b58d82d408274# Parent 6de1ff734cf1b30051f1864da24d4e9db5a9372c Merge diff -r 80e75cbb08d6 -r e8a76ff6e1a4 src/java.instrument/share/native/libinstrument/JPLISAgent.c --- a/src/java.instrument/share/native/libinstrument/JPLISAgent.c Wed Oct 18 21:06:31 2017 +0000 +++ b/src/java.instrument/share/native/libinstrument/JPLISAgent.c Wed Oct 18 22:10:28 2017 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, 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 @@ -783,7 +783,10 @@ int len = (last_slash == NULL) ? 0 : (int)(last_slash - cname); char* pkg_name_buf = (char*)malloc(len + 1); - jplis_assert_msg(pkg_name_buf != NULL, "OOM error in native tmp buffer allocation"); + if (pkg_name_buf == NULL) { + fprintf(stderr, "OOM error in native tmp buffer allocation"); + return NULL; + } if (last_slash != NULL) { strncpy(pkg_name_buf, cname, len); }