crash.software
Projects
Pull Requests
Issues
Builds
protobuf-decoder
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
protobuf-decoder
Commits
bd75a8de
🤬
Sign In
Small fix in a specific point of protobuf library to use python bytearray instead of memoryview, that crashes many deserializations due to incomplete Jython support
federicodotta
committed
3 years ago
bd75a8de
1 parent
def7d078
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
Total 1 files
■ ■ ■ ■
■
■
Lib/google/protobuf/internal/decoder.py
skipped 297 lines
298
298
299
299
def InnerDecode(buffer, pos):
300
300
new_pos = pos + value_size
301
-
result = local_unpack(format, buffer[pos:new_pos])[0]
301
+
#
result = local_unpack(format, buffer[pos:new_pos])[0]
302
+
# Little fix because memoryview is only partially implemented in Jython, breaking deserialization. Converting to bytearray
303
+
# https://github.com/msgpack/msgpack-python/issues/303
304
+
result = local_unpack(format, bytearray(buffer[pos:new_pos]))[0]
302
305
return (result, new_pos)
303
306
return _SimpleDecoder(wire_type, InnerDecode)
304
307
skipped 755 lines
All occurrences
Please wait...
Page is in error, reload to recover