JDK-6768120 : Initialization of document base not working on Safari on Mac OS X
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u12
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-11-06
  • Updated: 2010-09-08
  • Resolved: 2009-01-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u12 b02Fixed
The code in the NPAPI version of the new Java Plug-In which fetches the initial document base from the browser is incorrectly assuming that the fetched NPString is null-terminated, causing garbage to be appended to the string and preventing applets from running in some situations.

SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u12/6768120.0

EVALUATION Changed MozPluginInstance::GetDocumentBase() to return newly allocated storage for simplicity's sake, and to properly null-terminate the resulting string. No test case as the bug only occurred in Safari on Mac OS X. Tested manually with that browser.