Index: libc/src/kNIX/os2/b_ldrOpen.c
===================================================================
--- libc/src/kNIX/os2/b_ldrOpen.c	(revision 3803)
+++ libc/src/kNIX/os2/b_ldrOpen.c	(working copy)
@@ -47,6 +47,14 @@
     int         rc;
 
     /*
+     * Access to main program is not supported.
+     */
+    if (pszLibrary == NULL)
+    {
+        LIBCLOG_ERROR_RETURN_INT(ERROR_INVALID_PARAMETER);
+    }
+
+    /*
      * Resolve the path if one is given.  Ignore failures to resolve the file
      * name is it may lack the extension (I think) - DosLoadModule will fail,
      * so no problem.
