hotspot/src/share/vm/utilities/xmlstream.cpp
changeset 5402 c51fd0c1d005
parent 768 d0bebc7eefc2
child 5547 f4b087cbb361
equal deleted inserted replaced
5401:30bda607cb67 5402:c51fd0c1d005
   326 }
   326 }
   327 
   327 
   328 // ------------------------------------------------------------------
   328 // ------------------------------------------------------------------
   329 void xmlStream::va_done(const char* format, va_list ap) {
   329 void xmlStream::va_done(const char* format, va_list ap) {
   330   char buffer[200];
   330   char buffer[200];
   331   guarantee(strlen(format) + 10 < sizeof(buffer), "bigger format buffer")
   331   guarantee(strlen(format) + 10 < sizeof(buffer), "bigger format buffer");
   332   const char* kind = format;
   332   const char* kind = format;
   333   const char* kind_end = strchr(kind, ' ');
   333   const char* kind_end = strchr(kind, ' ');
   334   size_t kind_len = (kind_end != NULL) ? (kind_end - kind) : strlen(kind);
   334   size_t kind_len = (kind_end != NULL) ? (kind_end - kind) : strlen(kind);
   335   strncpy(buffer, kind, kind_len);
   335   strncpy(buffer, kind, kind_len);
   336   strcpy(buffer + kind_len, "_done");
   336   strcpy(buffer + kind_len, "_done");