From 0346117711c19883ba0aadd5dea19654a26bc69d Mon Sep 17 00:00:00 2001 From: sgehwolf Date: Tue, 4 Dec 2018 17:54:13 +0100 Subject: [PATCH] 8214061: Buffer written into itself Summary: Actually write the msg text into the buffer. Reviewed-by: dcubed, sgehwolf, sspitsyn Contributed-by: Simon Tooke --- src/share/back/debugInit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/back/debugInit.c b/src/share/back/debugInit.c index 3475397e0..536bc7a99 100644 --- a/src/share/back/debugInit.c +++ b/src/share/back/debugInit.c @@ -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 @@ jniFatalError(JNIEnv *env, const char *msg, jvmtiError error, int exit_code) (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); -- GitLab