-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault when opening .epub generated by a specific RSS feed due to 0-width image in SVG #12004
Comments
I can reproduce with the 2024.04 AppImage, but not on master: try the nightly. |
The nightly works! Thanks so much! |
Adding a note for me to fix, for another bug with this book:
|
For reference, the original segfault is solved by koreader/crengine@cb7d5e2.
<button id="menu-open" class="header__menu--open hamburger"
type="button" title="Menu" aria-label="Menu">
<i class="icon icon-menu icon--sm">
<svg class="icon__svg">
<use xlink:href="https://www.404media.co/assets/icons/feather-sprite.svg?v=41c333e33d#menu"></use>
</svg>
</i> </button> |
The "View HTML" crash is due to some multilines attribute value:
a case I didn't think about :) |
Should be fixed with: --- a/crengine/src/lvtinydom.cpp
+++ b/crengine/src/lvtinydom.cpp
@@ -4738,8 +4738,10 @@ static void writeNodeEx( LVStream * stream, ldomNode * node, lString32Collection
}
}
else {
- // Ignoring an attribute or its value is left to frontend
- *extra_stream << "\t[" << attrName << "=" << attrValue << "]";
+ // Ignoring an attribute or its value is left to frontend.
+ // But we don't want to mess the extra_stream specific format
+ // with a multilines attribute value: replace \n with a space.
+ *extra_stream << "\t[" << attrName << "=" << attrValue.replace('\n', ' ') << "]";
}
}
} |
Includes: - Russian hyphenation: revert "allow hyphens after не" koreader/crengine#568 - Serbian hyphenation: combine patterns for Cyrillic and Latin scripts koreader/crengine#566 - writeNodeEx(): fix handling of multilines attribute values koreader/crengine#569 See #12004 (comment). - Add getBalancedHTML() helper Also includes: - kobo: add missing blitbuffer library koreader/koreader-base#1823
Issue
I'm a subscriber to 404 Media, which produces private, subscriber-only RSS feeds. When I download news articles from these feeds, KOReader experiences a segfault when trying to open them. Other RSS feeds work without issue. I've attached one of the generated .epub files, since the RSS feed is not public. It's zipped, since GitHub wouldn't let me upload the .epub
24-06-06_05-55_Inside a Kidnapping Planned on the FBI's Secret Chat App.epub.zip
Please let me know if you want anything else! And thank you so much for making KOReader!!
Steps to reproduce
.epub
files in KOReadercrash.log
(if applicable)Attached
crash.log
downloaded after restart -> open RSS .epub, with verbose debugging enabledcrash.log
The text was updated successfully, but these errors were encountered: