INTHNDLR.C, 428

    if (lr.AH != 0x59)
      CritErrCode = SUCCESS;
  }
  /* Clear carry by default for these functions */

+       /* see PATCH TE 5 jul 04 explanation at end */
+  if (ErrorMode && lr.AH > 0x0c && lr.AH != 0x30 && lr.AH != 0x59)
+      {
+         ErrorMode = 0;                      
+      fnode[0].f_count = 0;    /* don't panic - THEY ARE unused !! */
+      fnode[1].f_count = 0;
+      }





INTHNDLR.C:1514


real_exit:;

        /* PATCH !!       TE 5 JUL 04
                what happened:
                Application does FindFirst("I:\*.*");
                this fails, and causes Int24
                  this sets ErrorMode, and calls Int24
                    Application decides NOT to return to DOS,
                    but instead pop the stack and return to itself
                      (this is legal; see RBIL/INT 24 description
                
                a) now the alloc()'ed fnode[0] never gets free()'ed
                b) errormode NEVER gets set back to 0 unyil exit()
                
                I have NO idea how real DOS handles this;
                the appended patch cures the worst symptoms
        */            

  if (fnode[0].f_count  != 0 ||
      fnode[1].f_count  != 0 ) 
      {
      if (ErrorMode == 0)
              put_string("near_fnodes not 0"); /* panic ?? */
              
      fnode[0].f_count  = 0;    /* don't panic - THEY ARE unused !! */
      fnode[1].f_count  = 0;
      }

    
                /* PATCH !! END    TE 5 JUL 04 */


tom




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to