Skip to content

is there a file size limit in penet #359

@icbccxy

Description

@icbccxy

If the file size is greater than 2GB, will PeNet encounter an exception? something like this:
`

Unhandled exception. System.IO.IOException: The file is too long. This operation is currently limited to supporting files less than 2 gigabytes in size.
at System.IO.File.ReadAllBytes(String path)
at sample.CFileBasicAttr.CheckFileHeader(String filePath)
at sample.CFileBasicAttr.GetFileClass(String filePath)
at sample.CPackageFile.IsPackage(String path)
at samleupload.SampleUpload.GetTargetFiles(String path, TargetFileType ftype)
at samleupload.SampleUpload.Main(String[] args)

`

here is an another piece of code:
`
private static FileClass CheckFileHeader(string filePath)
{

 // checking an file is pe or not
 PeFile? peFile;
 if (PeFile.TryParse(filePath, out peFile) && peFile != null)
 {
     return FileClass.PE;
 }
...

`

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