Skip to content

Bad read offset for PS5 version? #16

@stevemonaco

Description

@stevemonaco

I'm working on a refactor fork (not sure if it will get to the finish line) and noticed the following code:

#region Get PS5 version
try
{
BinaryReader reader = new BinaryReader(new FileStream(pathToDump, FileMode.Open));
//Set the position of the reader
reader.BaseStream.Position = offsetOne;
//Read the offset
offsetOneValue = BitConverter.ToString(reader.ReadBytes(12)).Replace("-", null);
reader.Close();
}
catch
{
// Obviously this value is invalid, so null the value and move on
offsetOneValue = null;
}
try
{
BinaryReader reader = new BinaryReader(new FileStream(pathToDump, FileMode.Open));
//Set the position of the reader
reader.BaseStream.Position = offsetOne;
//Read the offset
offsetTwoValue = BitConverter.ToString(reader.ReadBytes(12)).Replace("-", null);
reader.Close();
}
catch
{
// Obviously this value is invalid, so null the value and move on
offsetTwoValue = null;
}

Assigning offsetOne to reader.BaseStream.Position for both reads which seems strange. So I think there's a bug. Unfortunately, I can't test the software at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions