Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4364256

Crash can occur because awt_FileDialog.cpp doesn't call load_shell_procs().

XMLWordPrintable

    • ladybird
    • x86
    • windows_98



        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; }
        }

        ======================================================================

              ibdsunw Ibd Ibd (Inactive)
              pallenba Peter Allenbach (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: