Changeset 4273 for trunk/tools


Ignore:
Timestamp:
Sep 16, 2000, 7:30:25 PM (25 years ago)
Author:
bird
Message:

Addjusted and commented the signature fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/dbginfo/kHll.cpp

    r4271 r4273  
    1 /* $Id: kHll.cpp,v 1.16 2000-09-16 15:17:07 bird Exp $
     1/* $Id: kHll.cpp,v 1.17 2000-09-16 17:30:25 bird Exp $
    22 *
    33 * kHll - Implementation of the class kHll.
     
    22502250                                    /*
    22512251                                     * Write dummy signature (_VerifySignature in the OS2KRNL checks this).
     2252                                     *  The signatures size is the last dword in the file.
     2253                                     *  If we pad that dword with 0 (or a number larger than the filesize)
     2254                                     *  the module is verified successfully by the OS2KRNL.
     2255                                     *
     2256                                     *  FYI. If the verify fails a DosExit is issued in the init process,
     2257                                     *  and it will crash due to a bad exception handler point (at fs:0)
     2258                                     *  when the termination exception occures. Which so leads to another
     2259                                     *  exception in the exceptionhandler (which don't check for NULL
     2260                                     *  pointers to exceptionhandlers only -1 pointers).
    22522261                                     */
    2253                                     static char aFakeSig[0x200] = {0};
     2262                                    static char achFakeSig[4] = {0};
    22542263                                    if (fseek(phFile, 0, SEEK_END) == 0)
    22552264                                    {
    2256                                         if (fwrite(&aFakeSig[0], 1, sizeof(aFakeSig), phFile) == sizeof(aFakeSig))
     2265                                        if (fwrite(&achFakeSig[0], 1, sizeof(achFakeSig), phFile) == sizeof(achFakeSig))
    22572266                                        {
    2258                                             cch += sizeof(aFakeSig);
     2267                                            cch += sizeof(achFakeSig);
    22592268
    22602269                                            /*
Note: See TracChangeset for help on using the changeset viewer.