In vms.c, the sys$parse() call for cleaning up a search context was called after ther buffers assigned to the structure had already been freed.

This path was always exercised by the code for handling doing a stat() call for "_NLA0:" where the pool corruption caused the stat() call to fail.

This patch fixes the search context to be cleared before the buffers are freed and also by default disables the work around for having NLA0: handled special.

-John
[EMAIL PROTECTED]
Personal Opinion Only
--- /rsync_root/perl/vms/vms.c  Tue Mar 21 05:51:47 2006
+++ vms/vms.c   Sun Mar 26 00:16:39 2006
@@ -5000,11 +5000,13 @@
         else { /* No; just work with potential name */
           if (dirfab.fab$l_sts == RMS$_FNF) dirnam = savnam;
           else { 
+           int fab_sts;
+           fab_sts = dirfab.fab$l_sts;
+           sts = rms_free_search_context(&dirfab);
            PerlMem_free(esa);
            PerlMem_free(trndir);
            PerlMem_free(vmsdir);
-            set_errno(EVMSERR);  set_vaxc_errno(dirfab.fab$l_sts);
-           sts = rms_free_search_context(&dirfab);
+            set_errno(EVMSERR);  set_vaxc_errno(fab_sts);
             return NULL;
           }
         }
@@ -11543,7 +11545,7 @@
     }
 
     /* PCP mode requires creating /dev/null special device file */
-    decc_bug_devnull = 1;
+    decc_bug_devnull = 0;
     status = sys_trnlnm("DECC_BUG_DEVNULL", val_str, sizeof(val_str));
     if ($VMS_STATUS_SUCCESS(status)) {
        if ((val_str[0] == 'E') || (val_str[0] == '1') || (val_str[0] == 'T'))

Reply via email to