Acme-Win32-PEPM

 view release on metacpan or  search on metacpan

lib/Win32/PEPM/Build.pm  view on Meta::CPAN

#C:/perl/***.pm line 154.
$text .= $nl.'__END__'.$nl if $pos == -1;
$text = 'MZ' #DOS MAGIC
    .';' #make the magic not be a syntax error
    .$nl.'#!!!!WARNING do not edit this file!!!!'.$nl
    .' ' #space pad to the heredoc
        x (0x40 #DOS headers full length
        -length('MZ')
        -length(';')
        -length($nl.'#!!!!WARNING do not edit this file!!!!'.$nl)
        -length('<<e_lfanew;'.$nl) #heredoc to escape
        -4 #size of DWORD e_lfanew
        )
    .'<<e_lfanew;'.$nl #heredoc
    ."\x01\x01\x01\x01" #e_lfanew member, a U32/DWORD offset, will be overwritten by linker
    #end of 0x40 area, things below are now supposed executable space of the dos prog
    .$nl.'e_lfanew'.$nl.$nl #end quoting of the binary offset
    .$text
    #note the "Rich Signature" appears here before PE header
    #after going through VC linker, the Rich Signature IS NOT uninitialized
    #memory leaking from VC linker due to our garbage MZ header with invalid



( run in 0.433 second using v1.01-cache-2.11-cpan-c21f80fb71c )