Skip to content

8341095: Possible overflow in os::Posix::print_uptime_info #24140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 17 commits into from
Closed
4 changes: 2 additions & 2 deletions src/hotspot/os/posix/os_posix.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
Expand Down Expand Up @@ -551,7 +551,7 @@ void os::Posix::print_uptime_info(outputStream* st) {
setutxent();
while ((ent = getutxent())) {
if (!strcmp("system boot", ent->ut_line)) {
bootsec = ent->ut_tv.tv_sec;
bootsec = (int)ent->ut_tv.tv_sec;
break;
}
}
Expand Down