question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueError: Buffer size too small

See original GitHub issue
# ropper --file dbghelp.dll  --chain virtualprotect
Traceback (most recent call last):
  File "/usr/bin/ropper", line 11, in <module>
    load_entry_point('ropper==1.12.5', 'console_scripts', 'ropper')()
  File "/usr/lib/python3/dist-packages/ropper/__main__.py", line 36, in main
    ropper.start(sys.argv[1:])
  File "/usr/lib/python3/dist-packages/ropper/__init__.py", line 52, in start
    Console(app_options).start()
  File "/usr/lib/python3/dist-packages/ropper/console.py", line 184, in start
    self.__loadFile(file)
  File "/usr/lib/python3/dist-packages/ropper/console.py", line 203, in __loadFile
    arch=self.__options.arch)
  File "/usr/lib/python3/dist-packages/ropper/service.py", line 514, in addFile
    loader = Loader.open(name, bytes=bytes, raw=raw, arch=arch)
  File "/usr/lib/python3/dist-packages/ropper/loaders/loader.py", line 178, in open
    return subclass(fileName, bytes)
  File "/usr/lib/python3/dist-packages/ropper/loaders/pe.py", line 49, in __init__
    super(PE, self).__init__(filename, bytes, arch)
  File "/usr/lib/python3/dist-packages/ropper/loaders/loader.py", line 82, in __init__
    self.__binary = self._loadFile(filename, bytes)
  File "/usr/lib/python3/dist-packages/ropper/loaders/pe.py", line 123, in _loadFile
    return pe.PE(fileName, bytes)
  File "/usr/lib/python3/dist-packages/filebytes/pe.py", line 430, in __init__
    self.__sections = self._parseSections(self._bytes, self.imageDosHeader, self.imageNtHeaders)
  File "/usr/lib/python3/dist-packages/filebytes/pe.py", line 506, in _parseSections
    raw = (c_ubyte * size).from_buffer(data, ishdr.PointerToRawData)
ValueError: Buffer size too small (1038848 instead of at least 1074372 bytes)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sashscommented, Dec 27, 2019

Hey. This is a problem of filebytes not of ropper. I will check that.

0reactions
br-sncommented, Dec 19, 2022

Hi sashs,

I’ve attached it below - cheers.

ntoskrnl.exe.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to parse Ctype structure in python received from socket
_fields_ can only be set once; If the buffer is too small, ValueError is raised; The 2 nd value returned is the number...
Read more >
Buffer size **SOLVED** | Pycom user forum
I get ValueError: buffer too small. ... Pre-sales of limited volume EVKs with BLE AirQ and Time of Flight sensors goes live TODAY...
Read more >
Issue 18225: ctypes Structure data size is incorrect
Structure with mixed ctypes, the size of all components is ... <module> Test.from_buffer(bytearray(5)) ValueError: Buffer size too small (5 ...
Read more >
ctypes bug with _pack_ = 1? : r/learnpython - Reddit
But I'm getting the wrong sizes when using _pack_=1. ... in <module> Test.from_buffer(bytearray(1)) ValueError: Buffer size too small (1 instead of at least ......
Read more >
Numeric or value error: character string buffer too small
Hi Nayomi, This is a one possible explanation of this error can be occur. "numeric or value error: character string buffer too small"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found