Skip to content

Commit 0d6b3ad

Browse files
author
duke
committed
Backport 2d6045a26f60fb36f69680e3a83b8303ab2c13e4
1 parent 70ba5d4 commit 0d6b3ad

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
@@ -435,7 +435,7 @@ static char *matchJavaTZ(const char *java_home_dir, char *tzName)
435435
strcpy(mapFileName, java_home_dir);
436436
strcat(mapFileName, MAPPINGS_FILE);
437437

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

0 commit comments

Comments
 (0)