mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
7158804: Improve config file parsing
Check buffer length when reading Reviewed-by: dholmes, dcubed
This commit is contained in:
parent
0a84e90eea
commit
c39971d4f1
3 changed files with 33 additions and 3 deletions
|
@ -860,7 +860,7 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
|
|||
bool result = true;
|
||||
|
||||
int c = getc(stream);
|
||||
while(c != EOF) {
|
||||
while(c != EOF && pos < (int)(sizeof(token)-1)) {
|
||||
if (in_white_space) {
|
||||
if (in_comment) {
|
||||
if (c == '\n') in_comment = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue