-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
ladybird
-
x86
-
windows_98
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2036436 | 1.4.0 | Ibd Ibd | P3 | Resolved | Fixed | beta |
Name: pa48320 Date: 08/21/2000
There is a bug in awt_FileDialog.cpp in that it never calls load_shell_procs().
If setFilenameFilter() is called with a non-null object, then:
ofn.Flags |= OFN_ENABLEINCLUDENOTIFY;
is executed. On Win2000 and Win98 (maybe Win98SE or with some upgrade, Comdlg32.ocx Version 6.00.8169) this will cause CDN_INCLUDEITEM notifications to occur. Handling for this notification calls:
get_path_from_idlist(pidl,szPath)
However, nowhere in awt_FileDialog.cpp is load_shell_procs() called to insure the get_path_from_idlist function pointer is set. Calling this function with the pointer still set to null crashes the VM.
With a sufficiently up to date version of Windows 98 or Windows 2000, the following program should crash:
import java.io.*;
import java.awt.*;
public class FileDialogBug
{
static void main(String[] args)
{
FileDialog fDlg = new FileDialog(new Frame());
fDlg.addNotify();
fDlg.setFilenameFilter(new MyFilter());
fDlg.show();
System.exit(0);
}
}
class MyFilter implements FilenameFilter
{
public boolean accept(File dir,String name) { return true; }
}
======================================================================
- backported by
-
JDK-2036436 Crash can occur because awt_FileDialog.cpp doesn't call load_shell_procs().
-
- Resolved
-