You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a segmentation fault when using my tool, which is built on top of markdown-pdf. The issue arises when converting a Markdown file containing an empty heading (line 59). I’ve attached the file for reference.
While I understand that this edge case is rare, I wanted my tool to handle such situations seamlessly, so I investigated further and identified the root cause in your code.
Resolution: Upgrading PyMuPDF to version 1.24.6 or later resolves the segmentation fault. I verified this by upgrading to version 1.25.1, which generated a clean PDF.
Suggestion:
Please consider updating your PyMuPDF dependency to version >= 1.24.6.
Thank you for your time, and let me know if I can provide further details! 😊
The text was updated successfully, but these errors were encountered:
Description:
Hello!
First, thank you for this fantastic tool 🥰.
I encountered a segmentation fault when using my tool, which is built on top of
markdown-pdf
. The issue arises when converting a Markdown file containing an empty heading (line 59). I’ve attached the file for reference.While I understand that this edge case is rare, I wanted my tool to handle such situations seamlessly, so I investigated further and identified the root cause in your code.
Steps to Reproduce:
markdown-pdf
.Observed Behavior:
A segmentation fault occurs when processing the file.
Analysis:
The issue is triggered at the following line during the second iteration of the
while
loop in theadd_section
method:Here's the relevant code snippet for context:
(Note: The print statements were added for debugging purposes.)
Root Cause:
The segmentation fault seems to be related to the handling of empty headings in Markdown.
Proposed Solution:
Upgrading the
PyMuPDF
dependency resolves the issue. Specifically:PyMuPDF
to version 1.24.6 or later resolves the segmentation fault. I verified this by upgrading to version 1.25.1, which generated a clean PDF.Suggestion:
Please consider updating your
PyMuPDF
dependency to version >= 1.24.6.Thank you for your time, and let me know if I can provide further details! 😊
The text was updated successfully, but these errors were encountered: