[Okular-devel] Review Request 122074: Fix crash when arguments().mimeType() is an invalid mimetype name.
David Faure
faure at kde.org
Fri Jan 16 16:49:56 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122074/#review74145
-----------------------------------------------------------
Yeah, the mimetype for a file is application/octet-stream if we can't find a better mimetype.
But when asking for a mimetype by name and it doesn't exist, that's null.
QMimeType has this too, isDefault vs isValid.
part.cpp
<https://git.reviewboard.kde.org/r/122074/#comment51500>
Why? we know it's non-null at that point. Did you read line 1341 correctly? We go into the second case if argMime is null.
- David Faure
On Jan. 15, 2015, 3:44 p.m., David Faure wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122074/
> -----------------------------------------------------------
>
> (Updated Jan. 15, 2015, 3:44 p.m.)
>
>
> Review request for Okular and Albert Astals Cid.
>
>
> Repository: okular
>
>
> Description
> -------
>
> I have a JIRA bug report with a PDF attached, and mid-clicking the PDF
> in konqueror leads to opening an okularpart with mimetype="application/x-octet-stream"
> (the x- in there is very unusual, and unknown to shared-mime-info).
> Fixed with null pointer checks.
>
>
> Diffs
> -----
>
> part.cpp 263f3ad0bd0945590463092df4efdcb9b9515e90
>
> Diff: https://git.reviewboard.kde.org/r/122074/diff/
>
>
> Testing
> -------
>
> crashes without the patch, works with the patch.
>
>
> Do I need to manually apply this to master or frameworks, or do you merge regularly?
>
>
> Thanks,
>
> David Faure
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20150116/d6dbe9a3/attachment-0001.html>
More information about the Okular-devel
mailing list