This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 65
Custom renderer segfaults on empty codespan #67
Comments
Workaround fix in
with
|
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
<#67 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACpx6A0aNEtPeMUCFi2iADZlVRzWkXVAks5uz-F_gaJpZM4Y5qEN>
.
|
Thanks! Fixed: 25ad527 |
@FSX is there a bug fix release? |
@lepture Just now. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
checkThe text was updated successfully, but these errors were encountered: