MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / adjust_FileAlignment

Method adjust_FileAlignment

pythonmemorymodule/pefile.py:7382–7392  ·  view source on GitHub ↗
(self, val, file_alignment)

Source from the content-addressed store, hash-verified

7380 #
7381 # The following is a hard-coded constant if the Windows loader
7382 def adjust_FileAlignment(self, val, file_alignment):
7383 if file_alignment > FILE_ALIGNMENT_HARDCODED_VALUE:
7384 # If it's not a power of two, report it:
7385 if self.FileAlignment_Warning is False and not power_of_two(file_alignment):
7386 self.__warnings.append(
7387 "If FileAlignment > 0x200 it should be a power of 2. Value: %x"
7388 % (file_alignment)
7389 )
7390 self.FileAlignment_Warning = True
7391
7392 return cache_adjust_FileAlignment(val, file_alignment)
7393
7394 # According to the document:
7395 # [ Microsoft Portable Executable and Common Object File Format Specification ]

Callers 5

__parse__Method · 0.95
parse_sectionsMethod · 0.95

Calls 2

power_of_twoFunction · 0.85

Tested by

no test coverage detected