hasherezade / pe-bear-releases

PE-bear (builds only)
https://hshrzd.wordpress.com/pe-bear/
767 stars 73 forks source link

Crash on adding new section (bug in 0.3.9) #3

Closed hasherezade closed 5 years ago

hasherezade commented 5 years ago

Not observed in the previous release: 0.3.8

Test case

PE-sieve32.exe 0.1.6 (e92ed07132888ff8be1f52a9b2b36f21)

Problem

After we try to add any section with non-zero size, program crashes. Adding a new empty section does not cause any issues. 32-bit Windows build: crash_on_adding_new_sec

64-bit Windows build: 64bit

hasherezade commented 5 years ago

The crash is caused by the RichHeader wrapper not being reloaded, and still pointing to the old buffer.

hasherezade commented 5 years ago

Fixed in 0.3.9.5