src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/arguments.cpp	Thu Oct  3 13:55:41 2013
--- new/src/share/vm/runtime/arguments.cpp	Thu Oct  3 13:55:41 2013

*** 2682,2704 **** --- 2682,2706 ---- return JNI_EINVAL; } FLAG_SET_CMDLINE(uintx, MaxHeapSize, (uintx)long_max_heap_size); // Xmaxf } else if (match_option(option, "-Xmaxf", &tail)) { ! int maxf = (int)(atof(tail) * 100); ! if (maxf < 0 || maxf > 100) { ! char* err; ! int maxf = (int)(strtod(tail, &err) * 100); + if (*err != '\0' || maxf < 0 || maxf > 100) { jio_fprintf(defaultStream::error_stream(), "Bad max heap free percentage size: %s\n", option->optionString); return JNI_EINVAL; } else { FLAG_SET_CMDLINE(uintx, MaxHeapFreeRatio, maxf); } // Xminf } else if (match_option(option, "-Xminf", &tail)) { ! int minf = (int)(atof(tail) * 100); ! if (minf < 0 || minf > 100) { ! char* err; ! int minf = (int)(strtod(tail, &err) * 100); + if (*err != '\0' || minf < 0 || minf > 100) { jio_fprintf(defaultStream::error_stream(), "Bad min heap free percentage size: %s\n", option->optionString); return JNI_EINVAL; } else {

src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File