Skip to content

Commit a59dbc5

Browse files
author
Damon Nguyen
committed
8373475: Unintentional format string in logString of AccessInfo.cpp
Reviewed-by: aivanov, prr, azvegint
1 parent 72e1e15 commit a59dbc5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/jdk.accessibility/windows/native/toolscommon/AccessInfo.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -97,8 +97,7 @@ void logString(FILE *logfile, const char *msg, ...) {
9797
va_start(argprt, msg);
9898
vsnprintf(tmpbuf, sizeof(tmpbuf), msg, argprt);
9999

100-
fprintf(logfile, tmpbuf);
101-
fprintf(logfile, "\n");
100+
fprintf(logfile, "%s\n", tmpbuf);
102101
fflush(logfile);
103102
}
104103

0 commit comments

Comments
 (0)