From a59dbc5105b04234c501aa03474b82481658e5b5 Mon Sep 17 00:00:00 2001 From: Damon Nguyen Date: Wed, 24 Dec 2025 00:05:27 +0000 Subject: [PATCH] 8373475: Unintentional format string in logString of AccessInfo.cpp Reviewed-by: aivanov, prr, azvegint --- .../windows/native/toolscommon/AccessInfo.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/jdk.accessibility/windows/native/toolscommon/AccessInfo.cpp b/src/jdk.accessibility/windows/native/toolscommon/AccessInfo.cpp index b9cd8434fc7..256f123c83a 100644 --- a/src/jdk.accessibility/windows/native/toolscommon/AccessInfo.cpp +++ b/src/jdk.accessibility/windows/native/toolscommon/AccessInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, 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 @@ -97,8 +97,7 @@ void logString(FILE *logfile, const char *msg, ...) { va_start(argprt, msg); vsnprintf(tmpbuf, sizeof(tmpbuf), msg, argprt); - fprintf(logfile, tmpbuf); - fprintf(logfile, "\n"); + fprintf(logfile, "%s\n", tmpbuf); fflush(logfile); }