Project: SWT
Bug 76983 [browser] Download.java uses wrong pointer
Reported: 2004-10-25 19:00:02 | Status: resolved fixed

From Javier Pedemonte: I think there is a bug in the Init() method of Eclipse SWT Browser/mozilla/org/eclipse/swt/browser/Download.java. I'm not too familiar with this code, so I decided to send you a note rather than open a bug. Here is the code in question: nsILocalFile target = new nsILocalFile(aTarget); int aNativeTarget = XPCOM.nsEmbedCString_new(); target.GetNativeLeafName(aNativeTarget); length = XPCOM.nsEmbedCString_Length(aSpec); buffer = XPCOM.nsEmbedCString_get(aSpec); dest = new byte[length]; XPCOM.memmove(dest, buffer, length); XPCOM.nsEmbedCString_delete(aNativeTarget); String file = new String(dest); I think the two instances of |aSpec| here should instead be |aNativeTarget|. javier

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Browser/mozilla/org/eclipse/swt/browser/Download.java