Closed mlinhard closed 5 years ago
Workaround fix in callbacks.py
:
Replace line
text = ffi.string(text.data, text.size).decode('utf-8')
with
text = " " if text == ffi.NULL else ffi.string(text.data, text.size).decode('utf-8')
Bonjour souple
Le 29 nov. 2018 6:30 AM, "Michal Linhard" notifications@github.com a écrit :
Workaround fix in callbacks.py: Replace line
text = ffi.string(text.data, text.size).decode('utf-8')
with
text = " " if text == ffi.NULL else ffi.string(text.data, text.size).decode('utf-8')
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FSX/misaka/issues/67#issuecomment-442833983, or mute the thread https://github.com/notifications/unsubscribe-auth/ACpx6A0aNEtPeMUCFi2iADZlVRzWkXVAks5uz-F_gaJpZM4Y5qEN .
Thanks!
Fixed: 25ad527a266fd7df221ba8a0a3bdde7dd75edaf3
@FSX is there a bug fix release?
@lepture Just now.
If I create a custom renderer (e.g. one that converts codespans to simple brackets) and call it on input with empty codespan it segfaults:
The problem is here:
The text will be a NULL CData object and dereferencing
text.data
attribute will segfault.I worked around it with
ffi.NULL
check