Skip to content

Commit 82e16ba

Browse files
committedJan 9, 2025
8347268: [ubsan] logOutput.cpp:357:21: runtime error: applying non-zero offset 1 to null pointer
Reviewed-by: dholmes
1 parent 33f9be8 commit 82e16ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/hotspot/share/logging/logOutput.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 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
@@ -354,7 +354,9 @@ bool LogOutput::parse_options(const char* options, outputStream* errstream) {
354354
}
355355
break;
356356
}
357-
pos = comma_pos + 1;
357+
if (comma_pos != nullptr) {
358+
pos = comma_pos + 1;
359+
}
358360
} while (comma_pos != nullptr);
359361

360362
os::free(opts);

0 commit comments

Comments
 (0)
Please sign in to comment.