Summary: | Ksnapshot crashes/segfaults when dragging screenshot to web browser window | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | V字龍(Vdragon) <Vdragon.Taiwan> |
Component: | kimgio | Assignee: | Aaron J. Seigo <aseigo> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | cfeck, kollix, pascal.massimino, spamfunnel144 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-runtime/1eb8bc91fc720235bbd4c95665453ca7d065d0b9 | Version Fixed In: | |
Attachments: | fix the stride value for RGB case (no alpha) |
Description
V字龍(Vdragon)
2015-04-13 03:42:38 UTC
Crash is in libwebp. @Christoph I redirected the bug to [libwebp upstream](https://code.google.com/p/webp/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=247) but it seems that the crash in libwebp is caused by improper call from kimgio: ````````````````````````````` Looks like an invalid pointer calling the libwebp library. Looking at the KDE code for webp support, i think there's a potential bug in file kimgio/webp.cpp:119 It reads: size = WebPEncodeRGB(imageData, image.width(), image.height(), image.width() * 4, quality, &output); but i think it should be: size = WebPEncodeRGB(imageData, image.width(), image.height(), image.width() * 3, quality, &output); https://projects.kde.org/projects/kde/kde-runtime/repository/revisions/master/entry/kimgio/webp.cpp ````````````````````````````` The analysis looks right, adding Martin to confirm. According to webp maintainers: https://code.google.com/p/webp/issues/detail?id=252 This issue may be related to this one: https://bugs.kde.org/show_bug.cgi?id=349730 Created attachment 100938 [details]
fix the stride value for RGB case (no alpha)
Please find attached a simple patch to fix the stride value in case the format is RGB (without alpha).
Hope it helps,
skal/
Git commit 1eb8bc91fc720235bbd4c95665453ca7d065d0b9 by Martin Koller. Committed on 05/09/2016 at 18:27. Pushed by mkoller into branch 'Applications/16.08'. Fix writing of webp data M +5 -0 kimgio/CMakeLists.txt M +1 -1 kimgio/webp.cpp http://commits.kde.org/kde-runtime/1eb8bc91fc720235bbd4c95665453ca7d065d0b9 |