Control: tags -1 + upstream patch

Dear Maintainer,
I could reproduce the crash with some old versions of
php_enhanced_en.chm I found on the net [1].

The current version from php.net [2] does not crash.
While it looks like the search is also not working
and gives no results.

With a package built with the attached patch I could
search in both versions, and received the same results
like in windows.

Kind regards,
Bernhard


[1]
http://jftp.just.edu.tw/Edoc/php_enhanced_en.chm
http://ftp.ntu.edu.tw/php/distributions/manual/php_enhanced_kr.chm

[2]
https://www.php.net/distributions/manual/php_enhanced_en.chm

Backtrace:
(gdb) bt
#0  0x004a166e in memcpy (__len=<optimized out>, __src=<optimized out>, 
__dest=0xa2f4e0) at /usr/include/i386-linux-gnu/bits/string_fortified.h:34
#1  CHMFile::GetLeafNodeOffset (this=<optimized out>, text=..., 
initialOffset=<optimized out>, buffSize=<optimized out>, treeDepth=<optimized 
out>, ui=<optimized out>) at chmfile.cpp:974
#2  0x004a657f in CHMFile::IndexSearch (this=0xa5e720, text=..., 
wholeWords=true, titlesOnly=false, results=0xbf9b2848) at chmfile.cpp:818
#3  0x004be8a4 in CHMSearchPanel::OnSearch (this=0x97c060) at 
/usr/include/wx-3.0/wx/checkbox.h:63
#4  0xb75e9cdf in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, 
wxEventFunctor&, wxEvent&) const () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#5  0xb777c5f8 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase 
const&, wxEvtHandler*, wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#6  0xb777c716 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () 
from /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#7  0xb777caac in wxEvtHandler::TryHereOnly(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#8  0xb777cb3a in wxEvtHandler::ProcessEventLocally(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
...
Description: Avoid crash and make search work for specific file
 This is an attempt to start the search at the begin
 every time a block is received from chm_retrieve_object.
 Delivers the same search results as Windows 7 CHM viewer.

Author: Bernhard Übelacker <bernha...@mailbox.org>

Bug-Debian: https://bugs.debian.org/944284
Forwarded: no
Last-Update: 2019-11-22

--- xchm-1.23.orig/src/chmfile.cpp
+++ xchm-1.23/src/chmfile.cpp
@@ -985,6 +985,7 @@ uint32_t CHMFile::GetLeafNodeOffset(cons
 			if(text.CmpNoCase(word) <= 0) {
 				cursor32 = buffer.get() + i + word_len + 1;
 				initialOffset = UINT32ARRAY(cursor32);
+				i = sizeof(uint16_t);
 				break;
 			}
 
# Buster/stable i386 qemu VM 2019-11-22

apt update
apt dist-upgrade

apt install dpkg-dev devscripts systemd-coredump xserver-xorg lightdm openbox 
xterm mc gdb xchm xchm-dbgsym
apt build-dep libchm1
apt build-dep xchm

reboot


mkdir /home/benutzer/source/xchm/orig -p
cd    /home/benutzer/source/xchm/orig
apt source xchm
cd

mkdir /home/benutzer/source/libchm1/orig -p
cd    /home/benutzer/source/libchm1/orig
apt source libchm1
cd


export LANG=C
export DISPLAY=:0


########


dmesg:
[78147.255491] xchm[18096]: segfault at 2749000 ip 0046d66e sp bfa35c30 error 4 
in xchm[460000+3c000]
[78147.255515] Code: 04 0f 82 a5 fd ff ff 8b 06 8b 95 3c ff ff ff 89 02 8b 44 
0e fc 8d 7a 04 83 e7 fc 89 44 0a fc 89 d0 29 f8 01 c1 29 c6 c1 e9 02 <f3> a5 e9 
8d fd ff ff 8d 76 00 85 c0 0f 84 10 02 00 00 50 8b 85 10

0x0046d66e - 0x460000 + 0x3c000 = 0x4966E

benutzer@debian:~$ addr2line --function --demangle --exe=/usr/bin/xchm 0x4966E
wxNavigationEnabled<wxBookCtrlBase>::AcceptsFocusRecursively() const
/usr/include/wx-3.0/wx/buffer.h:44


gdb -q --args /usr/bin/xchm

set width 0
set pagination off
directory /home/benutzer/source/xchm/orig/xchm-1.23/src
b main
run
dele 1

(gdb) info target
        0x004196b0 - 0x00453d34 is .text

(gdb) find /b 0x004196b0, 0x00453d34, 0x04, 0x0f, 0x82, 0xa5, 0xfd, 0xff, 0xff, 
0x8b, 0x06, 0x8b, 0x95, 0x3c, 0xff, 0xff, 0xff, 0x89, 0x02, 0x8b, 0x44, 0x0e, 
0xfc, 0x8d, 0x7a, 0x04, 0x83, 0xe7, 0xfc, 0x89, 0x44, 0x0a, 0xfc, 0x89, 0xd0, 
0x29, 0xf8, 0x01, 0xc1, 0x29, 0xc6, 0xc1, 0xe9, 0x02, 0xf3, 0xa5, 0xe9, 0x8d, 
0xfd, 0xff, 0xff, 0x8d, 0x76, 0x00, 0x85, 0xc0, 0x0f, 0x84, 0x10, 0x02, 0x00, 
0x00, 0x50, 0x8b, 0x85, 0x10

0x425644 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, unsigned 
int, unsigned short, chmUnitInfo*)+948>
1 pattern found.

(gdb) disassemble /r 0x425644,0x425644+62
Dump of assembler code from 0x425644 to 0x425682:
   0x00425644 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+948>:      04 0f   add    $0xf,%al
   0x00425646 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+950>:      82 a5 fd ff ff 8b 06    
andb   $0x6,-0x74000003(%ebp)
   0x0042564d <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+957>:      8b 95 3c ff ff ff       
mov    -0xc4(%ebp),%edx
   0x00425653 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+963>:      89 02   mov    
%eax,(%edx)
   0x00425655 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+965>:      8b 44 0e fc     mov    
-0x4(%esi,%ecx,1),%eax
   0x00425659 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+969>:      8d 7a 04        lea    
0x4(%edx),%edi
   0x0042565c <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+972>:      83 e7 fc        and    
$0xfffffffc,%edi
   0x0042565f <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+975>:      89 44 0a fc     mov    
%eax,-0x4(%edx,%ecx,1)
   0x00425663 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+979>:      89 d0   mov    %edx,%eax
   0x00425665 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+981>:      29 f8   sub    %edi,%eax
   0x00425667 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+983>:      01 c1   add    %eax,%ecx
   0x00425669 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+985>:      29 c6   sub    %eax,%esi
   0x0042566b <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+987>:      c1 e9 02        shr    
$0x2,%ecx
   0x0042566e <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+990>:      f3 a5   rep movsl 
%ds:(%esi),%es:(%edi)
   0x00425670 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+992>:      e9 8d fd ff ff  jmp    
0x425402 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, unsigned 
int, unsigned short, chmUnitInfo*)+370>
   0x00425675 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+997>:      8d 76 00        lea    
0x0(%esi),%esi
   0x00425678 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+1000>:     85 c0   test   %eax,%eax
   0x0042567a <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+1002>:     0f 84 10 02 00 00       
je     0x425890 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+1536>
   0x00425680 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+1008>:     50      push   %eax
   0x00425681 <CHMFile::GetLeafNodeOffset(wxString const&, unsigned int, 
unsigned int, unsigned short, chmUnitInfo*)+1009>:     8b 85 10 ff ff ff       
mov    -0xf0(%ebp),%eax
End of assembler dump.

(gdb) b *0x0042566e
Breakpoint 2 at 0x42566e: file 
/usr/include/i386-linux-gnu/bits/string_fortified.h, line 34.
(gdb) info b
Num     Type           Disp Enb Address    What
2       breakpoint     keep y   0x0042566e in memcpy at 
/usr/include/i386-linux-gnu/bits/string_fortified.h:34

##########


benutzer@debian:~$ wget 
https://www.php.net/distributions/manual/php_enhanced_en.chm
benutzer@debian:~$ wget 
http://ftp.us.es/ftp/Mirror/www.php.net/distributions/manual/php_enhanced_en.chm
benutzer@debian:~$ wget 
http://mhs.stmikayani.ac.id/onotrak/file/xml/Materi/php_enhanced_en.chm
benutzer@debian:~$ wget http://jftp.just.edu.tw/Edoc/php_enhanced_en.chm
benutzer@debian:~$ wget 
http://ftp.ntu.edu.tw/php/distributions/manual/php_enhanced_kr.chm

benutzer@debian:~$ ls -lisah php_enhanced_*.chm*
 62 32M -rw-r--r-- 1 benutzer benutzer 32M Aug 23 16:10 php_enhanced_en.chm
 96 29M -rw-r--r-- 1 benutzer benutzer 29M May 15  2015 php_enhanced_en.chm.1
 98 30M -rw-r--r-- 1 benutzer benutzer 30M Oct  2  2015 php_enhanced_en.chm.2
106 29M -rw-r--r-- 1 benutzer benutzer 29M Jun  5  2017 php_enhanced_en.chm.3
113 31M -rw-r--r-- 1 benutzer benutzer 31M Nov 11  2016 php_enhanced_kr.chm

benutzer@debian:~$ md5sum php_enhanced_*.chm*
2417d1affa4b8a257926b00be47333ec  php_enhanced_en.chm
8d946f7219d91791aee258d2be41f498  php_enhanced_en.chm.1
f67c9fc7174085a1c4f7d8570833eaa6  php_enhanced_en.chm.2
479bd7253241f538764558e6706833d8  php_enhanced_en.chm.3
653ca33e2d0692de0f29a81ff3643586  php_enhanced_kr.chm


#########


benutzer@debian:~$ /usr/bin/xchm php_enhanced_en.chm.3

(xchm:1064): Gtk-WARNING **: 15:29:30.045: Attempting to store changes into 
`/home/benutzer/.local/share/recently-used.xbel', but failed: Failed to create 
file ?/home/benutzer/.local/share/recently-used.xbel.SCWMB0?: No such file or 
directory

(xchm:1064): Gtk-WARNING **: 15:29:30.046: Attempting to set the permissions of 
`/home/benutzer/.local/share/recently-used.xbel', but failed: No such file or 
directory
Segmentation fault (core dumped)


dmesg
[ 2765.450374] xchm[1064]: segfault at 14b4000 ip 004a166e sp bf9b1a90 error 4 
in xchm[494000+3c000]
[ 2765.450387] Code: 04 0f 82 a5 fd ff ff 8b 06 8b 95 3c ff ff ff 89 02 8b 44 
0e fc 8d 7a 04 83 e7 fc 89 44 0a fc 89 d0 29 f8 01 c1 29 c6 c1 e9 02 <f3> a5 e9 
8d fd ff ff 8d 76 00 85 c0 0f 84 10 02 00 00 50


root@debian:~# coredumpctl list
TIME                            PID   UID   GID SIG COREFILE  EXE
Fri 2019-11-22 15:29:34 CET    1064  1000  1000  11 present   /usr/bin/xchm


root@debian:~# coredumpctl gdb
           PID: 1064 (xchm)
           UID: 1000 (benutzer)
           GID: 1000 (benutzer)
        Signal: 11 (SEGV)
     Timestamp: Fri 2019-11-22 15:29:33 CET (1min 59s ago)
  Command Line: /usr/bin/xchm php_enhanced_en.chm.3
    Executable: /usr/bin/xchm
 Control Group: /user.slice/user-1000.slice/session-4.scope
          Unit: session-4.scope
         Slice: user-1000.slice
       Session: 4
     Owner UID: 1000 (benutzer)
       Boot ID: b525a7456253469f8f4ec6c0fd396526
    Machine ID: 45f49504b47f4e5690bc479adf67aa5b
      Hostname: debian
       Storage: 
/var/lib/systemd/coredump/core.xchm.1000.b525a7456253469f8f4ec6c0fd396526.1064.1574432973000000.lz4
       Message: Process 1064 (xchm) of user 1000 dumped core.
                
                Stack trace of thread 1064:
                #0  0x00000000004a166e memcpy (xchm)
                #1  0x00000000004a657f 
_ZN7CHMFile11IndexSearchERK8wxStringbbP16CHMSearchResults (xchm)
                #2  0x00000000004be8a4 
_ZN14CHMSearchPanel8OnSearchER14wxCommandEvent (xchm)
                #3  0x00000000b75e9cdf 
_ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent
 (libwx_baseu-3.0.so.0)
                #4  0x00000000b777c5f8 
_ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent
 (libwx_baseu-3.0.so.0)
                #5  0x00000000b777c716 
_ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler 
(libwx_baseu-3.0.so.0)
                #6  0x00000000b777caac _ZN12wxEvtHandler11TryHereOnlyER7wxEvent 
(libwx_baseu-3.0.so.0)
                #7  0x00000000b777cb3a 
_ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent (libwx_baseu-3.0.so.0)
                #8  0x00000000b777cbdf 
_ZN12wxEvtHandler12ProcessEventER7wxEvent (libwx_baseu-3.0.so.0)
                #9  0x00000000b7c42dd1 _ZN12wxWindowBase8TryAfterER7wxEvent 
(libwx_gtk2u_core-3.0.so.0)
                #10 0x00000000b777c970 
_ZN12wxEvtHandler18SafelyProcessEventER7wxEvent (libwx_baseu-3.0.so.0)
                #11 0x00000000b7c445df 
_ZNK12wxWindowBase17HandleWindowEventER7wxEvent (libwx_gtk2u_core-3.0.so.0)
                #12 0x00000000b7afc3b3 _ZN10wxTextCtrl6OnCharER10wxKeyEvent 
(libwx_gtk2u_core-3.0.so.0)
                #13 0x00000000b75e9cdf 
_ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent
 (libwx_baseu-3.0.so.0)
                #14 0x00000000b777c5f8 
_ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent
 (libwx_baseu-3.0.so.0)
                #15 0x00000000b777c716 
_ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler 
(libwx_baseu-3.0.so.0)
                #16 0x00000000b777caac _ZN12wxEvtHandler11TryHereOnlyER7wxEvent 
(libwx_baseu-3.0.so.0)
                #17 0x00000000b777cb3a 
_ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent (libwx_baseu-3.0.so.0)
                #18 0x00000000b777cbdf 
_ZN12wxEvtHandler12ProcessEventER7wxEvent (libwx_baseu-3.0.so.0)
                #19 0x00000000b777c970 
_ZN12wxEvtHandler18SafelyProcessEventER7wxEvent (libwx_baseu-3.0.so.0)
                #20 0x00000000b7c445df 
_ZNK12wxWindowBase17HandleWindowEventER7wxEvent (libwx_gtk2u_core-3.0.so.0)
                #21 0x00000000b7a71b6a n/a (libwx_gtk2u_core-3.0.so.0)
                #22 0x00000000b6e136e7 n/a (libgtk-x11-2.0.so.0)
                #23 0x00000000b6bd5128 g_closure_invoke (libgobject-2.0.so.0)
                #24 0x00000000b6be8bb2 n/a (libgobject-2.0.so.0)
                #25 0x00000000b6bf1961 g_signal_emit_valist 
(libgobject-2.0.so.0)
                #26 0x00000000b6bf2425 g_signal_emit (libgobject-2.0.so.0)
                #27 0x00000000b6f354d4 n/a (libgtk-x11-2.0.so.0)
                #28 0x00000000b6f4a024 gtk_window_propagate_key_event 
(libgtk-x11-2.0.so.0)
                #29 0x00000000b7a5e124 n/a (libwx_gtk2u_core-3.0.so.0)
                #30 0x00000000b6e136e7 n/a (libgtk-x11-2.0.so.0)
                #31 0x00000000b6bd5128 g_closure_invoke (libgobject-2.0.so.0)
                #32 0x00000000b6be8bb2 n/a (libgobject-2.0.so.0)
                #33 0x00000000b6bf1961 g_signal_emit_valist 
(libgobject-2.0.so.0)
                #34 0x00000000b6bf2425 g_signal_emit (libgobject-2.0.so.0)
                #35 0x00000000b6f354d4 n/a (libgtk-x11-2.0.so.0)
                #36 0x00000000b6e11546 gtk_propagate_event (libgtk-x11-2.0.so.0)
                #37 0x00000000b6e118ad gtk_main_do_event (libgtk-x11-2.0.so.0)
                #38 0x00000000b6c80629 n/a (libgdk-x11-2.0.so.0)
                #39 0x00000000b67f5fad g_main_context_dispatch 
(libglib-2.0.so.0)
                #40 0x00000000b67f6269 n/a (libglib-2.0.so.0)
                #41 0x00000000b67f6609 g_main_loop_run (libglib-2.0.so.0)
                #42 0x00000000b6e10675 gtk_main (libgtk-x11-2.0.so.0)
                #43 0x00000000b7a48d25 _ZN14wxGUIEventLoop5DoRunEv 
(libwx_gtk2u_core-3.0.so.0)
                #44 0x00000000b762ddb3 _ZN15wxEventLoopBase3RunEv 
(libwx_baseu-3.0.so.0)
                #45 0x00000000b75f0071 _ZN16wxAppConsoleBase8MainLoopEv 
(libwx_baseu-3.0.so.0)
                #46 0x00000000b7b0e65f _ZN9wxAppBase5OnRunEv 
(libwx_gtk2u_core-3.0.so.0)
                #47 0x00000000b768053a _Z7wxEntryRiPPw (libwx_baseu-3.0.so.0)
                #48 0x00000000b7681253 _Z7wxEntryRiPPc (libwx_baseu-3.0.so.0)
                #49 0x000000000049c116 main (xchm)
                #50 0x00000000b7205b41 __libc_start_main (libc.so.6)
                #51 0x000000000049d7a9 _start (xchm)

set width 0
set pagination off
directory /home/benutzer/source/xchm/orig/xchm-1.23/src
bt

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x004a166e in memcpy (__len=<optimized out>, __src=<optimized out>, 
__dest=0xa2f4e0) at /usr/include/i386-linux-gnu/bits/string_fortified.h:34

warning: Source file is more recent than executable.
34        return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
[Current thread is 1 (Thread 0xb5b1a900 (LWP 1064))]
(gdb) set width 0
(gdb) set pagination off
(gdb) directory /home/benutzer/source/xchm/orig/xchm-1.23/src
Source directories searched: 
/home/benutzer/source/xchm/orig/xchm-1.23/src:$cdir:$cwd
(gdb) bt
#0  0x004a166e in memcpy (__len=<optimized out>, __src=<optimized out>, 
__dest=0xa2f4e0) at /usr/include/i386-linux-gnu/bits/string_fortified.h:34
#1  CHMFile::GetLeafNodeOffset (this=<optimized out>, text=..., 
initialOffset=<optimized out>, buffSize=<optimized out>, treeDepth=<optimized 
out>, ui=<optimized out>) at chmfile.cpp:974
#2  0x004a657f in CHMFile::IndexSearch (this=0xa5e720, text=..., 
wholeWords=true, titlesOnly=false, results=0xbf9b2848) at chmfile.cpp:818
#3  0x004be8a4 in CHMSearchPanel::OnSearch (this=0x97c060) at 
/usr/include/wx-3.0/wx/checkbox.h:63
#4  0xb75e9cdf in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, 
wxEventFunctor&, wxEvent&) const () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#5  0xb777c5f8 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase 
const&, wxEvtHandler*, wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#6  0xb777c716 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () 
from /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#7  0xb777caac in wxEvtHandler::TryHereOnly(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#8  0xb777cb3a in wxEvtHandler::ProcessEventLocally(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#9  0xb777cbdf in wxEvtHandler::ProcessEvent(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#10 0xb7c42dd1 in wxWindowBase::TryAfter(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#11 0xb777c970 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#12 0xb7c445df in wxWindowBase::HandleWindowEvent(wxEvent&) const () from 
/usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#13 0xb7afc3b3 in wxTextCtrl::OnChar(wxKeyEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#14 0xb75e9cdf in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, 
wxEventFunctor&, wxEvent&) const () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#15 0xb777c5f8 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase 
const&, wxEvtHandler*, wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#16 0xb777c716 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () 
from /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#17 0xb777caac in wxEvtHandler::TryHereOnly(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#18 0xb777cb3a in wxEvtHandler::ProcessEventLocally(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#19 0xb777cbdf in wxEvtHandler::ProcessEvent(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#20 0xb777c970 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#21 0xb7c445df in wxWindowBase::HandleWindowEvent(wxEvent&) const () from 
/usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#22 0xb7a71b6a in ?? () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#23 0xb6e136e7 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#24 0xb6bd5128 in g_closure_invoke () from 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#25 0xb6be8bb2 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#26 0xb6bf1961 in g_signal_emit_valist () from 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#27 0xb6bf2425 in g_signal_emit () from 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#28 0xb6f354d4 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#29 0xb6f4a024 in gtk_window_propagate_key_event () from 
/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#30 0xb7a5e124 in ?? () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#31 0xb6e136e7 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#32 0xb6bd5128 in g_closure_invoke () from 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#33 0xb6be8bb2 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#34 0xb6bf1961 in g_signal_emit_valist () from 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#35 0xb6bf2425 in g_signal_emit () from 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#36 0xb6f354d4 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#37 0xb6e11546 in gtk_propagate_event () from 
/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#38 0xb6e118ad in gtk_main_do_event () from 
/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#39 0xb6c80629 in ?? () from /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#40 0xb67f5fad in g_main_context_dispatch () from 
/usr/lib/i386-linux-gnu/libglib-2.0.so.0
#41 0xb67f6269 in ?? () from /usr/lib/i386-linux-gnu/libglib-2.0.so.0
#42 0xb67f6609 in g_main_loop_run () from 
/usr/lib/i386-linux-gnu/libglib-2.0.so.0
#43 0xb6e10675 in gtk_main () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#44 0xb7a48d25 in wxGUIEventLoop::DoRun() () from 
/usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#45 0xb762ddb3 in wxEventLoopBase::Run() () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#46 0xb75f0071 in wxAppConsoleBase::MainLoop() () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#47 0xb7b0e65f in wxAppBase::OnRun() () from 
/usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#48 0xb768053a in wxEntry(int&, wchar_t**) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#49 0xb7681253 in wxEntry(int&, char**) () from 
/usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#50 0x0049c116 in main (argc=<optimized out>, argv=0xbf9b3ac4) at chmapp.cpp:277

(gdb) up
#1  CHMFile::GetLeafNodeOffset (this=<optimized out>, text=..., 
initialOffset=<optimized out>, buffSize=<optimized out>, treeDepth=<optimized 
out>, ui=<optimized out>) at chmfile.cpp:974
974                             memcpy(wrd_buf, buffer.get() + i + 2, word_len 
- 1);

(gdb) list 939,977
939     uint32_t CHMFile::GetLeafNodeOffset(const wxString& text,
940                                          uint32_t initialOffset,
941                                          uint32_t buffSize,
942                                          uint16_t treeDepth,
943                                          chmUnitInfo *ui)
944     {
945             uint32_t test_offset = 0;
946             unsigned char* cursor16;
947             unsigned char* cursor32;
948             unsigned char word_len, pos;
949             uint32_t i = sizeof(uint16_t);
950             UCharPtr buffer(new unsigned char[buffSize]);
951             wxString word;
952
953             if(!buffer.get())
954                     return 0;
955
956             while(--treeDepth) {
957                     if(initialOffset == test_offset)
958                             return 0;
959
960                     test_offset = initialOffset;
961                     if(::chm_retrieve_object(_chmFile, ui, buffer.get(), 
962                                              initialOffset, buffSize) == 0)
963                             return 0;
964
965                     cursor16 = buffer.get();
966                     uint16_t free_space = UINT16ARRAY(cursor16);
967
968                     while(i < buffSize - free_space) {
969
970                             word_len = *(buffer.get() + i);
971                             pos = *(buffer.get() + i + 1);
972
973                             char *wrd_buf = new char[word_len];
974                             memcpy(wrd_buf, buffer.get() + i + 2, word_len 
- 1);
975                             wrd_buf[word_len - 1] = 0;
976
977                             if(pos == 0)


(rr) list chm_lib.c:1502,1553
1502    /* grab a region from a compressed block */
1503    static Int64 _chm_decompress_region(struct chmFile *h,
1504                                        UChar *buf,
1505                                        UInt64 start,
1506                                        Int64 len)
1507    {
1508        UInt64 nBlock, nOffset;
1509        UInt64 nLen;
1510        UInt64 gotLen;
1511        UChar *ubuffer;
1512
1513        if (len <= 0)
1514            return (Int64)0;
1515
1516        /* figure out what we need to read */
1517        nBlock = start / h->reset_table.block_len;
1518        nOffset = start % h->reset_table.block_len;
1519        nLen = len;
1520        if (nLen > (h->reset_table.block_len - nOffset))
1521            nLen = h->reset_table.block_len - nOffset;
1522
1523        /* if block is cached, return data from it. */
1524        CHM_ACQUIRE_LOCK(h->lzx_mutex);
1525        CHM_ACQUIRE_LOCK(h->cache_mutex);
1526        if (h->cache_block_indices[nBlock % h->cache_num_blocks] == nBlock  
  &&
1527            h->cache_blocks[nBlock % h->cache_num_blocks] != NULL)
1528        {
1529            memcpy(buf,
1530                   h->cache_blocks[nBlock % h->cache_num_blocks] + nOffset,
1531                   (unsigned int)nLen);
1532            CHM_RELEASE_LOCK(h->cache_mutex);
1533            CHM_RELEASE_LOCK(h->lzx_mutex);
1534            return nLen;
1535        }
1536        CHM_RELEASE_LOCK(h->cache_mutex);
1537
1538        /* data request not satisfied, so... start up the decompressor 
machine */
1539        if (! h->lzx_state)
1540        {
1541            int window_size = ffs(h->window_size) - 1;
1542            h->lzx_last_block = -1;
1543            h->lzx_state = LZXinit(window_size);
1544        }
1545
1546        /* decompress some data */
1547        gotLen = _chm_decompress_block(h, nBlock, &ubuffer);
1548        if (gotLen < nLen)
1549            nLen = gotLen;
1550        memcpy(buf, ubuffer+nOffset, (unsigned int)nLen);
1551        CHM_RELEASE_LOCK(h->lzx_mutex);
1552        return nLen;
1553    }



############




gdb -q --args /usr/bin/xchm php_enhanced_en.chm.3

set width 0
set pagination off
directory /home/benutzer/source/xchm/orig/xchm-1.23/src
b chmfile.cpp:973
run




############



# Buster/stable amd64 qemu VM 2019-11-22


dpkg --add-architecture i386

apt update
apt dist-upgrade

apt install dpkg-dev devscripts systemd-coredump xserver-xorg lightdm openbox 
xterm mc gdb rr xchm:i386 xchm-dbgsym:i386 libchm1-dbgsym:i386 libchm-bin:i386 
libc6-dbg:i386 libstdc++6-8-dbg:i386


reboot


mkdir /home/benutzer/source/xchm/orig -p
cd    /home/benutzer/source/xchm/orig
apt source xchm
cd

mkdir /home/benutzer/source/libchm1/orig -p
cd    /home/benutzer/source/libchm1/orig
apt source libchm1
cd


benutzer@debian:~$ wget http://jftp.just.edu.tw/Edoc/php_enhanced_en.chm
benutzer@debian:~$ ls -lisah php_enhanced_en.chm 
799847 29M -rw-r--r-- 1 benutzer benutzer 29M Jun  5  2017 php_enhanced_en.chm
benutzer@debian:~$ md5sum php_enhanced_en.chm 
479bd7253241f538764558e6706833d8  php_enhanced_en.chm



echo 1 > /proc/sys/kernel/perf_event_paranoid

export LANG=C
export DISPLAY=:0

rr /usr/bin/xchm php_enhanced_en.chm

rr replay /home/benutzer/.local/share/rr/xchm-3

set width 0
set pagination off
directory /home/benutzer/source/xchm/orig/xchm-1.23/src
directory /home/benutzer/source/libchm1/orig/chmlib-0.40a/src
cont
b CHMFile::GetLeafNodeOffset
reverse-stepi
reverse-cont


benutzer@debian:~$ rr /usr/bin/xchm php_enhanced_en.chm
rr: Saving execution to trace directory `/home/benutzer/.local/share/rr/xchm-3'.
Segmentation fault

benutzer@debian:~$ rr replay /home/benutzer/.local/share/rr/xchm-3
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/xchm...Reading symbols from 
/usr/lib/debug/.build-id/78/3a9aa91a437b6a8cc1690ee435cad05c4bb045.debug...done.
done.
Really redefine built-in command "restart"? (y or n) [answered Y; input not 
from terminal]
Remote debugging using 127.0.0.1:7524
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
0xf7f230b0 in ?? () from /lib/ld-linux.so.2
(rr) set width 0
(rr) set pagination off
(rr) directory /home/benutzer/source/xchm/orig/xchm-1.23/src
Source directories searched: 
/home/benutzer/source/xchm/orig/xchm-1.23/src:$cdir:$cwd
(rr) cont
Continuing.
[New Thread 884.901]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x5660f66e in memcpy (__len=<optimized out>, __src=<optimized out>, 
__dest=0x57a67a00) at /usr/include/i386-linux-gnu/bits/string_fortified.h:34
34      /usr/include/i386-linux-gnu/bits/string_fortified.h: No such file or 
directory.
(rr) bt
#0  0x5660f66e in memcpy (__len=<optimized out>, __src=<optimized out>, 
__dest=0x57a67a00) at /usr/include/i386-linux-gnu/bits/string_fortified.h:34
#1  CHMFile::GetLeafNodeOffset (this=<optimized out>, text=..., 
initialOffset=<optimized out>, buffSize=<optimized out>, treeDepth=<optimized 
out>, ui=<optimized out>) at chmfile.cpp:974
#2  0x5661457f in CHMFile::IndexSearch (this=0x57a96220, text=..., 
wholeWords=true, titlesOnly=false, results=0xff7febb8) at chmfile.cpp:818
#3  0x5662c8a4 in CHMSearchPanel::OnSearch (this=0x579ef3c0) at 
/usr/include/wx-3.0/wx/checkbox.h:63
#4  0xf7531cdf in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, 
wxEventFunctor&, wxEvent&) const () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#5  0xf76c45f8 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase 
const&, wxEvtHandler*, wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#6  0xf76c4716 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () 
from /lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#7  0xf76c4aac in wxEvtHandler::TryHereOnly(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#8  0xf76c4b3a in wxEvtHandler::ProcessEventLocally(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#9  0xf76c4bdf in wxEvtHandler::ProcessEvent(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#10 0xf7b8add1 in wxWindowBase::TryAfter(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#11 0xf76c4970 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#12 0xf7b8c5df in wxWindowBase::HandleWindowEvent(wxEvent&) const () from 
/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#13 0xf7a443b3 in wxTextCtrl::OnChar(wxKeyEvent&) () from 
/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#14 0xf7531cdf in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, 
wxEventFunctor&, wxEvent&) const () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#15 0xf76c45f8 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase 
const&, wxEvtHandler*, wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#16 0xf76c4716 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () 
from /lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#17 0xf76c4aac in wxEvtHandler::TryHereOnly(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#18 0xf76c4b3a in wxEvtHandler::ProcessEventLocally(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#19 0xf76c4bdf in wxEvtHandler::ProcessEvent(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#20 0xf76c4970 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#21 0xf7b8c5df in wxWindowBase::HandleWindowEvent(wxEvent&) const () from 
/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#22 0xf79b9b6a in ?? () from /lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#23 0xf6d326e7 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#24 0xf6af6128 in g_closure_invoke () from 
/lib/i386-linux-gnu/libgobject-2.0.so.0
#25 0xf6b09bb2 in ?? () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#26 0xf6b12961 in g_signal_emit_valist () from 
/lib/i386-linux-gnu/libgobject-2.0.so.0
#27 0xf6b13425 in g_signal_emit () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#28 0xf6e544d4 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#29 0xf6e69024 in gtk_window_propagate_key_event () from 
/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#30 0xf79a6124 in ?? () from /lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#31 0xf6d326e7 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#32 0xf6af6128 in g_closure_invoke () from 
/lib/i386-linux-gnu/libgobject-2.0.so.0
#33 0xf6b09bb2 in ?? () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#34 0xf6b12961 in g_signal_emit_valist () from 
/lib/i386-linux-gnu/libgobject-2.0.so.0
#35 0xf6b13425 in g_signal_emit () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#36 0xf6e544d4 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#37 0xf6d30546 in gtk_propagate_event () from 
/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#38 0xf6d308ad in gtk_main_do_event () from 
/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#39 0xf6ba1629 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#40 0xf6714fad in g_main_context_dispatch () from 
/lib/i386-linux-gnu/libglib-2.0.so.0
#41 0xf6715269 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#42 0xf6715609 in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#43 0xf6d2f675 in gtk_main () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#44 0xf7990d25 in wxGUIEventLoop::DoRun() () from 
/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#45 0xf7575db3 in wxEventLoopBase::Run() () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#46 0xf7538071 in wxAppConsoleBase::MainLoop() () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#47 0xf7a5665f in wxAppBase::OnRun() () from 
/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0
#48 0xf75c853a in wxEntry(int&, wchar_t**) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#49 0xf75c9253 in wxEntry(int&, char**) () from 
/lib/i386-linux-gnu/libwx_baseu-3.0.so.0
#50 0x5660a116 in main (argc=<optimized out>, argv=0xff7ffe34) at chmapp.cpp:277
(rr)


#############


@i386 VM:
benutzer@debian:~/source/libchm1/try1/chmlib-0.40a$ DEB_BUILD_OPTIONS='noopt' 
dpkg-buildpackage
benutzer@debian:~/source/xchm/try1/xchm-1.23$ DEB_BUILD_OPTIONS='noopt' 
dpkg-buildpackage


dpkg -i 
/home/benutzer/{libchm1_0.40a-5_i386.deb,libchm1-dbgsym_0.40a-5_i386.deb,libchm-bin_0.40a-5_i386.deb}
dpkg -i /home/benutzer/{xchm_1.23-3_i386.deb,xchm-dbgsym_1.23-3_i386.deb}


benutzer@debian:~$ rr /usr/bin/xchm php_enhanced_en.chm
rr: Saving execution to trace directory `/home/benutzer/.local/share/rr/xchm-5'.
Segmentation fault
benutzer@debian:~$ rr replay /home/benutzer/.local/share/rr/xchm-5






############


apt install okular okular-extra-backends

Okular takes ~5 minutes to open the files ...


############


Search for both files is working in Windows 7



############


9: /x initialOffset = 0xb6e128

(rr) print buffer->_p
$33 = (unsigned char *) 0x56a36bc0 "K"
(rr) x/50cb 0x56a36bc0 + 16
0x56a36bd0:     17 '\021'       0 '\000'        107 'k' 97 'a'  100 'd' 109 'm' 
53 '5'  95 '_'
0x56a36bd8:     97 'a'  116 't' 116 't' 114 'r' 105 'i' 98 'b'  117 'u' 116 't'
0x56a36be0:     101 'e' 115 's' -53 '\313'      -87 '\251'      92 '\\' 0 
'\000'        0 '\000'        0 '\000'


benutzer@debian:~/x$ extract_chmLib php_enhanced_en.chm x

benutzer@debian:~/x$ grep 5_attributes . -Rn
Übereinstimmungen in Binärdatei ./$FIftiMain


benutzer@debian:~/x$ hexdump -C ./\$FIftiMain | grep 00b6e12 -C10
00b6e080  f2 69 f4 8e 40 34 fa 04  a0 34 fa 04 40 74 fa 47  |.i..@4...4..@t.G|
00b6e090  00 ea 86 d5 80 70 eb 40  ec 98 a0 70 a8 7e 44 fe  |.....p.@...p.~D.|
00b6e0a0  25 c5 81 4c f5 10 e9 be  12 85 08 a9 a9 8f fd 86  |%..L............|
00b6e0b0  56 8a ce a5 20 84 35 29  44 20 f2 63 81 40 fd 0f  |V... .5)D .c.@..|
00b6e0c0  1a f8 d4 c0 80 fb 14 d8  f4 79 c0 0f 45 80 15 13  |.........y..E...|
00b6e0d0  08 61 28 92 80 f8 74 e8  f2 21 96 00 f3 aa 59 90  |.a(...t..!....Y.|
00b6e0e0  c0 f6 21 82 a0 50 c2 20  f0 61 a5 00 31 02 b0 00  |..!..P. .a..1...|
00b6e0f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00b6e110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 ff e7  |................|
00b6e120  9d 73 50 ff e7 bf 70 a0  4b 00 07 00 6a 74 68 6f  |.sP...p.K...jtho|
00b6e130  6d 65 de 29 5c 00 00 00  11 00 6b 61 64 6d 35 5f  |me.)\.....kadm5_|
00b6e140  61 74 74 72 69 62 75 74  65 73 cb a9 5c 00 00 00  |attributes..\...|
00b6e150  04 02 79 61 62 15 c4 5c  00 00 00 07 01 65 79 5f  |..yab..\.....ey_|
00b6e160  61 72 72 6f 29 5d 00 00  00 03 01 69 6c 06 5a 5d  |arro)].....il.Z]|
00b6e170  00 00 00 07 01 6e 6f 77  6e 61 74 87 90 5d 00 00  |.....nownat..]..|
00b6e180  00 1b 01 72 62 35 5f 6b  64 62 5f 64 69 73 61 6c  |...rb5_kdb_disal|
00b6e190  6c 6f 77 5f 70 72 6f 78  69 61 62 6c 65 be ab 5d  |low_proxiable..]|
00b6e1a0  00 00 00 04 01 77 69 63  69 c8 5d 00 00 00 06 00  |.....wici.].....|
00b6e1b0  6c 61 6e 64 73 44 f1 5d  00 00 00 07 02 73 74 70  |landsD.].....stp|
00b6e1c0  72 6f 70 63 44 5e 00 00  00 03 01 63 67 e9 76 5e  |ropcD^.....cg.v^|


previous:
9: /x initialOffset = 0xb9472a

benutzer@debian:~/x$ hexdump -C ./\$FIftiMain | grep 00b9472 -C10
00b93740  00 00 00 03 01 6d 77 ce  68 b7 00 00 00 0e 01 6f  |.....mw.h......o|
00b93750  75 72 73 65 72 76 65 72  70 61 74 68 3c 79 b8 00  |urserverpath<y..|
00b93760  00 00 0b 00 7a 61 63 68  61 74 77 6f 72 6b 0e a9  |....zachatwork..|
00b93770  b8 00 00 00 13 01 65 6e  64 5f 6d 69 6e 69 74 5f  |......end_minit_|
00b93780  66 75 6e 63 74 69 6f 6e  27 c6 b8 00 00 00 0b 01  |function'.......|
00b93790  69 70 5f 65 78 74 72 61  63 74 06 f2 b8 00 00 00  |ip_extract......|
00b937a0  07 00 de 61 6f 62 61 6e  11 17 b9 00 00 00 02 00  |...aoban........|
00b937b0  fe 2a 27 b9 00 00 00 00  00 00 00 00 00 00 00 00  |.*'.............|
00b937c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00b94720  00 00 00 00 00 00 00 00  00 00 c8 0f 08 00 6a 6f  |..............jo|
00b94730  75 72 6e 61 6c de 19 5c  00 00 00 17 00 78 73 64  |urnal..\.....xsd|
00b94740  5f 6e 6f 6e 70 6f 73 69  74 69 76 65 69 6e 74 65  |_nonpositiveinte|
00b94750  67 65 72 28 e1 b6 00 00  00 02 00 fe 2a 37 b9 00  |ger(........*7..|
00b94760  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00b9572a

benutzer@debian:~/x$ hexdump -C ./\$FIftiMain | tail
00b937b0  fe 2a 27 b9 00 00 00 00  00 00 00 00 00 00 00 00  |.*'.............|
00b937c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00b94720  00 00 00 00 00 00 00 00  00 00 c8 0f 08 00 6a 6f  |..............jo|
00b94730  75 72 6e 61 6c de 19 5c  00 00 00 17 00 78 73 64  |urnal..\.....xsd|
00b94740  5f 6e 6f 6e 70 6f 73 69  74 69 76 65 69 6e 74 65  |_nonpositiveinte|
00b94750  67 65 72 28 e1 b6 00 00  00 02 00 fe 2a 37 b9 00  |ger(........*7..|
00b94760  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00b9572a

--> near the end ???



#########


Also on amd64.

Reply via email to