Closed fishfacegit closed 3 months ago
With StringIO
the error is expected because StringIO
shouldn't be used with binary data. However, with BytesIO
it should work, and there's even a test case for that.
Can you provide more information about the segmentation fault? It's something that you reproduce? If so, please provide as many details as you can.
With
StringIO
the error is expected becauseStringIO
shouldn't be used with binary data. However, withBytesIO
it should work, and there's even a test case for that.Can you provide more information about the segmentation fault? It's something that you reproduce? If so, please provide as many details as you can.
Hello everybody,
I encountered the same problem. The documents of Yara states that using StringIO, but here it is also said that BytesIO should be used. Should we use StringIO or BytesIO? Are there any mistakes in the document?
And I found that the StringIO code provided on the document is very outdated. Now it should be written as follows: ‘’’ from io import StringIO buff = StringIO() ‘’’
The documents URLs: https://yara.readthedocs.io/en/stable/yarapython.html https://github.com/VirusTotal/yara/blob/master/docs/yarapython.rst
https://github.com/VirusTotal/yara-python/issues/192
I see a similar issues, which says in Python 3.x we may need to use io.BytesIO() instead of io.StringIO().
So the outdated documents misled us..
Documentation was updated.
Saving rules in memory to a buffer does not work.
data = BytesIO()
results inSegmentation fault (core dumped)