changeset 13438:3bb8137f36a8

8214061: Buffer written into itself Summary: Actually write the msg text into the buffer. Reviewed-by: dcubed, sgehwolf, sspitsyn Contributed-by: Simon Tooke <stooke@redhat.com>
author sgehwolf
date Tue, 04 Dec 2018 17:54:13 +0100
parents b6dcf8ae496c
children 56a6d4af2805 d56017f2c647 a854158a2c94
files src/share/back/debugInit.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/back/debugInit.c	Wed Feb 06 04:09:08 2019 +0000
+++ b/src/share/back/debugInit.c	Tue Dec 04 17:54:13 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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
@@ -665,7 +665,7 @@
         (void)snprintf(buf, sizeof(buf), "JDWP %s, jvmtiError=%s(%d)",
                     msg, jvmtiErrorText(error), error);
     } else {
-        (void)snprintf(buf, sizeof(buf), "JDWP %s", buf);
+        (void)snprintf(buf, sizeof(buf), "JDWP %s", msg);
     }
     if (env != NULL) {
         (*((*env)->FatalError))(env, buf);