< prev index next >

src/share/vm/logging/logFileOutput.cpp

Print this page

        

*** 114,129 **** _file_count = static_cast<uint>(value); _file_count_max_digits = static_cast<uint>(log10(static_cast<double>(_file_count)) + 1); _archive_name_len = 2 + strlen(_file_name) + _file_count_max_digits; _archive_name = NEW_C_HEAP_ARRAY(char, _archive_name_len, mtLogging); } else if (strcmp(FileSizeOptionKey, key) == 0) { ! size_t value = parse_value(value_str); ! if (value == SIZE_MAX || value > SIZE_MAX / K) { ! success = false; ! break; ! } ! _rotate_size = value * K; } else { success = false; break; } pos = comma_pos + 1; --- 114,124 ---- _file_count = static_cast<uint>(value); _file_count_max_digits = static_cast<uint>(log10(static_cast<double>(_file_count)) + 1); _archive_name_len = 2 + strlen(_file_name) + _file_count_max_digits; _archive_name = NEW_C_HEAP_ARRAY(char, _archive_name_len, mtLogging); } else if (strcmp(FileSizeOptionKey, key) == 0) { ! success = Arguments::atomull(value_str, &_rotate_size); } else { success = false; break; } pos = comma_pos + 1;
< prev index next >