Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nepomuk Core
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Unmaintained
Nepomuk Core
Commits
37f5c9df
Commit
37f5c9df
authored
11 years ago
by
Simeon Bird
Browse files
Options
Downloads
Patches
Plain Diff
epubextractor: Fix crash on some invalid files where epub_get_data
returns an error. BUG: 324307
parent
f9cd6bdb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/fileindexer/indexer/epubextractor.cpp
+3
-2
3 additions, 2 deletions
services/fileindexer/indexer/epubextractor.cpp
with
3 additions
and
2 deletions
services/fileindexer/indexer/epubextractor.cpp
+
3
−
2
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment