8347268: [ubsan] logOutput.cpp:357:21: runtime error: applying non-zero offset 1 to null pointer

Reviewed-by: dholmes
This commit is contained in:
Matthias Baesken 2025-01-09 08:32:09 +00:00
parent 33f9be8de7
commit 82e16ba248

View File

@ -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);