Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
Nepomuk Core
Commits
37f5c9df
Commit
37f5c9df
authored
Sep 03, 2013
by
Simeon Bird
Browse files
epubextractor: Fix crash on some invalid files where epub_get_data
returns an error. BUG: 324307
parent
f9cd6bdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
services/fileindexer/indexer/epubextractor.cpp
View file @
37f5c9df
...
...
@@ -188,7 +188,7 @@ SimpleResourceGraph EPubExtractor::extract(const QUrl& resUri, const QUrl& fileU
tit
=
epub_get_titerator
(
ePubDoc
,
TITERATOR_GUIDE
,
0
);
}
if
(
tit
)
{
if
(
epub_tit_curr_valid
(
tit
)
)
{
do
{
char
*
clink
=
epub_tit_get_curr_link
(
tit
);
...
...
@@ -196,7 +196,8 @@ SimpleResourceGraph EPubExtractor::extract(const QUrl& resUri, const QUrl& fileU
int
size
=
epub_get_data
(
ePubDoc
,
clink
,
&
data
);
free
(
clink
);
if
(
data
)
{
// epub_get_data returns -1 on failure
if
(
size
>
0
&&
data
)
{
QString
html
=
QString
::
fromUtf8
(
data
,
size
);
QTextDocument
doc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment