Skip to content

Commit b478771

Browse files
author
duke
committed
Backport 2d6045a26f60fb36f69680e3a83b8303ab2c13e4
1 parent e853a44 commit b478771

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java.base/windows/native/libjava/TimeZone_md.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 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
@@ -436,7 +436,7 @@ static char *matchJavaTZ(const char *java_home_dir, char *tzName)
436436
strcpy(mapFileName, java_home_dir);
437437
strcat(mapFileName, MAPPINGS_FILE);
438438

439-
if ((fp = fopen(mapFileName, "r")) == NULL) {
439+
if (fopen_s(&fp, mapFileName, "rt") != 0) {
440440
jio_fprintf(stderr, "can't open %s.\n", mapFileName);
441441
free((void *) mapFileName);
442442
return NULL;

0 commit comments

Comments
 (0)