Skip to content

Commit 3f8b122

Browse files
committed
extension: Fix IOStream.read_all() EOS handling
1 parent 29abf88 commit 3f8b122

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

frida/_frida/extension.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5037,6 +5037,12 @@ PyIOStream_read_all (PyIOStream * self, PyObject * args)
50375037

50385038
if (error == NULL)
50395039
{
5040+
if ((unsigned long) bytes_read != count)
5041+
{
5042+
Py_DecRef (buffer);
5043+
buffer = PyBytes_FromString ("");
5044+
}
5045+
50405046
result = buffer;
50415047
}
50425048
else

0 commit comments

Comments
 (0)