1.1 --- a/src/share/vm/runtime/arguments.cpp Sat Oct 12 00:49:19 2013 +0200 1.2 +++ b/src/share/vm/runtime/arguments.cpp Mon Oct 14 14:21:34 2013 +0200 1.3 @@ -2694,8 +2694,9 @@ 1.4 FLAG_SET_CMDLINE(uintx, MaxHeapSize, (uintx)long_max_heap_size); 1.5 // Xmaxf 1.6 } else if (match_option(option, "-Xmaxf", &tail)) { 1.7 - int maxf = (int)(atof(tail) * 100); 1.8 - if (maxf < 0 || maxf > 100) { 1.9 + char* err; 1.10 + int maxf = (int)(strtod(tail, &err) * 100); 1.11 + if (*err != '\0' || maxf < 0 || maxf > 100) { 1.12 jio_fprintf(defaultStream::error_stream(), 1.13 "Bad max heap free percentage size: %s\n", 1.14 option->optionString); 1.15 @@ -2705,8 +2706,9 @@ 1.16 } 1.17 // Xminf 1.18 } else if (match_option(option, "-Xminf", &tail)) { 1.19 - int minf = (int)(atof(tail) * 100); 1.20 - if (minf < 0 || minf > 100) { 1.21 + char* err; 1.22 + int minf = (int)(strtod(tail, &err) * 100); 1.23 + if (*err != '\0' || minf < 0 || minf > 100) { 1.24 jio_fprintf(defaultStream::error_stream(), 1.25 "Bad min heap free percentage size: %s\n", 1.26 option->optionString);