From 2e25801423984b1f26c53f201961e82c08ddee73 Mon Sep 17 00:00:00 2001 From: duke Date: Wed, 12 Feb 2025 11:37:47 +0000 Subject: [PATCH] Backport 82e16ba248a97e3446d5b2d64c353b61dd6bdda6 --- src/hotspot/share/logging/logOutput.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/logging/logOutput.cpp b/src/hotspot/share/logging/logOutput.cpp index 17d0e8b555d..6eba01d8aa6 100644 --- a/src/hotspot/share/logging/logOutput.cpp +++ b/src/hotspot/share/logging/logOutput.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -354,7 +354,9 @@ bool LogOutput::parse_options(const char* options, outputStream* errstream) { } break; } - pos = comma_pos + 1; + if (comma_pos != nullptr) { + pos = comma_pos + 1; + } } while (comma_pos != nullptr); os::free(opts);