peres returns corrupted version and DEBUG lines

Bug #2038581 reported by Dale Phurrough
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pev (Ubuntu)
New
Undecided
Unassigned

Bug Description

### Setup

Ubuntu 22.04.3 LTS distributed by Canonical on the Msft Store running on WSL2

```
Description: Ubuntu 22.04.3 LTS
Release: 22.04

pev:
  Installed: 0.81-7
  Candidate: 0.81-7
  Version table:
 *** 0.81-7 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status
```

### Repro

1. Open a Ubuntu 22.04.3 LTS prompt
2. `sudo apt install pev`
3. `peres -v /mnt/c/Windows/System32/kernel32.dll`

### Result

```
DEBUG: id=0xa0, dataOffset=0x80000020
DEBUG: Length=3, String=MUI
DEBUG: id=0x1, dataOffset=0x80000050
DEBUG: id=0x409, dataOffset=0x80
DEBUG: CodePage=0, OffsetToData=767064[0xbb458], Reserved=0[0], Size=200[0xc8]
DEBUG: id=0x10, dataOffset=0x80000038
DEBUG: id=0x1, dataOffset=0x80000068
DEBUG: id=0x409, dataOffset=0x90
DEBUG: CodePage=0, OffsetToData=766128[0xbb0b0], Reserved=0[0], Size=932[0x3a4]
File Version: 65263.1213.1.0
Product Version: 10.0.19041.3393
```

All the DEBUG lines are unexpected and should not appear.
Both the file and product versions are invalid.

You can do step 3 on any PE file from Microsoft or privately compiled. The file and product versions will be incorrect and unexpected DEBUG lines will appear.

### Expected

```
File Version: 10.0.19041.3393
```

The older package 0.80-4build1 from Ubuntu 20.04.6 LTS works correctly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.