Project: SWT
Bug 113019 Browser.setText() sometimes appends dust characters after html
Reported: 2005-10-18 18:49:44 | Status: resolved fixed

In DocumentComplete event handling block, Browser allocates memory with size of UTF8BOM and html, but does not care for stream size. GlobalAlloc rounds its size, so allocated memory size is different from required size. Without GMEM_ZEROINIT, memory will be rough. IStream eats them unrequired garbage. It should be allocated with GMEM_ZEROINIT. Or stream size should be set by IStream.SetSize (this is better but not implemented now).

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