diff --git a/src/hotspot/src/share/vm/code/dependencies.cpp b/src/hotspot/src/share/vm/code/dependencies.cpp index c284160e0e3..c4c8e9b45da 100644 --- a/src/hotspot/src/share/vm/code/dependencies.cpp +++ b/src/hotspot/src/share/vm/code/dependencies.cpp @@ -525,7 +525,7 @@ void Dependencies::write_dependency_to(xmlStream* xtty, xtty->object("x", arg.metadata_value()); } } else { - char xn[10]; sprintf(xn, "x%d", j); + char xn[12]; sprintf(xn, "x%d", j); if (arg.is_oop()) { xtty->object(xn, arg.oop_value()); } else { diff --git a/src/hotspot/src/share/vm/runtime/fprofiler.cpp b/src/hotspot/src/share/vm/runtime/fprofiler.cpp index 58cb6e89daa..89aa0cd8183 100644 --- a/src/hotspot/src/share/vm/runtime/fprofiler.cpp +++ b/src/hotspot/src/share/vm/runtime/fprofiler.cpp @@ -635,7 +635,7 @@ class vmNode : public ProfilerNode { const char *name() const { return _name; } bool is_compiled() const { return true; } - bool vm_match(const char* name) const { return strcmp(name, _name) == 0; } + bool vm_match(const char* name) const { return name == NULL ? false : strcmp(name, _name) == 0; } Method* method() { return NULL; }