|
1 | 1 | /* |
2 | | - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
@@ -226,9 +226,9 @@ int modify(bool enable) { |
226 | 226 | printf("Couldn't create file: %s\n", path); |
227 | 227 | perror("Error"); |
228 | 228 | } else { |
229 | | - char str[100] = "assistive_technologies=com.sun.java.accessibility.AccessBridge\n"; |
230 | | - strcat_s(str, "screen_magnifier_present=true\n"); |
231 | | - fprintf(origFile, str); |
| 229 | + fprintf(origFile, "%s", |
| 230 | + "assistive_technologies=com.sun.java.accessibility.AccessBridge\n" |
| 231 | + "screen_magnifier_present=true\n"); |
232 | 232 | fclose(origFile); |
233 | 233 | } |
234 | 234 | } else { |
@@ -314,11 +314,11 @@ void printVersion() { |
314 | 314 | pVSInfo->dwProductVersionMS & 0xFFFF, |
315 | 315 | pVSInfo->dwProductVersionLS >> 16, |
316 | 316 | pVSInfo->dwProductVersionLS & 0xFFFF ); |
317 | | - char outputString[100]; |
318 | | - strcpy_s(outputString, "jabswitch "); |
319 | | - strcat_s(outputString, versionString); |
320 | | - strcat_s(outputString, "\njabswitch enables or disables the Java Access Bridge.\n"); |
321 | | - printf(outputString); |
| 317 | + printf( |
| 318 | + "jabswitch %s\n" |
| 319 | + "jabswitch enables or disables the Java Access Bridge.\n", |
| 320 | + versionString |
| 321 | + ); |
322 | 322 | } |
323 | 323 |
|
324 | 324 | int regEnable() { |
|
0 commit comments