Interface OffsetValidator

All Known Implementing Classes:
DebugDirectoryParser, NTHeader, SeparateDebugHeader

public interface OffsetValidator
Provides methods for validating pointers and relative virtual addresses (RVA) in a PE file
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkPointer(long ptr)
    Returns whether or not the specified pointer is contained within the PE file.
    boolean
    checkRVA(long rva)
    Returns whether or not the specified RVA value is contained within the PE image.
    int
    Returns the PE's file alignment, or 0 if unknown/unused.
    int
    Returns the PE's sectionAlignment, or 0 if unknown/unused.
  • Method Details

    • checkPointer

      boolean checkPointer(long ptr)
      Returns whether or not the specified pointer is contained within the PE file.
      Parameters:
      ptr - the pointer value to check
      Returns:
      whether or not the specified pointer is contained within the PE file
    • checkRVA

      boolean checkRVA(long rva)
      Returns whether or not the specified RVA value is contained within the PE image.
      Parameters:
      rva - the RVA to check
      Returns:
      whether or not the specified RVA value is contained within the PE image
    • getFileAlignment

      int getFileAlignment()
      Returns the PE's file alignment, or 0 if unknown/unused.
      Returns:
      the PE's file alignment, or 0 if unknown/unused
    • getSectionAlignment

      int getSectionAlignment()
      Returns the PE's sectionAlignment, or 0 if unknown/unused.
      Returns:
      the PE's sectionAlignment, or 0 if unknown/unused