changeset 35936:e401b754ae09

8148005: One byte may be corrupted by get_datetime_string() Reviewed-by: dholmes
author asmotrak
date Thu, 04 Feb 2016 13:42:18 -0800
parents a2bae85710af
children a734965f7634
files hotspot/src/share/vm/utilities/ostream.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/utilities/ostream.cpp	Thu Feb 04 19:27:39 2016 +0100
+++ b/hotspot/src/share/vm/utilities/ostream.cpp	Thu Feb 04 13:42:18 2016 -0800
@@ -380,7 +380,7 @@
 char* get_datetime_string(char *buf, size_t len) {
   os::local_time_string(buf, len);
   int i = (int)strlen(buf);
-  while (i-- >= 0) {
+  while (--i >= 0) {
     if (buf[i] == ' ') buf[i] = '_';
     else if (buf[i] == ':') buf[i] = '-';
   }