Bug 319281 - Kleopatra crashes when trying to work with files with more than 2^31 bytes
Summary: Kleopatra crashes when trying to work with files with more than 2^31 bytes
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andre Heinecke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-03 15:37 UTC by Andre Heinecke
Modified: 2016-07-21 09:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Heinecke 2013-05-03 15:37:36 UTC
If you do something with a large enough file Kleopatra crashes.


Reproducible: Always

Steps to Reproduce:
1. dd if=/dev/zero of=output.dat  bs=1024  count=4200000
2. kleopatra -s output.dat
3. klick through the signing dialog
Actual Results:  
Crash

Expected Results:  
No Crash

This bug is pretty straightforward as an overflow happens in the progressbar.

Kleo::Crypto::Gui::NewResultPage::Private::progress(const QString&, int, int)") at assert.c:81
#9  0x00000000005de161 in Kleo::Crypto::Gui::NewResultPage::Private::progress (this=0x1669290, msg=..., progress=-2147483648, total=5832704) at

I'm using the tracker to document the bug / fix.
Comment 1 Andre Heinecke 2016-07-15 12:30:37 UTC
With GnuPG 2.1.14 came a fix yesterday for https://bugs.gnupg.org/gnupg/issue2368

Now GnuPG ensures that progress will fit into ints. But progress can no longer be mapped to bytes as Kleopatra does.

So the fix will be if gnupg < 2.1.14 just show knight rider progress and fix the setting of total progress. For GnuPG 2.1.14 ignore size and only use total + processed.
Comment 2 Andre Heinecke 2016-07-21 09:57:55 UTC
Git commit 26bcc69d99a47435a05d056e5aa37c597c815a31 by Andre Heinecke.
Committed on 21/07/2016 at 09:53.
Pushed by aheinecke into branch 'Applications/16.08'.

Workaround crash / assert due to progress overflow

This is not the fix I wanted to have as it still does
not show the real progress. But previously there also
wasn't any progress so this is not a regression and it
fixes a crash.

See BKO 365931 for an outline of a proper fix that actually
shows progress.
Related: bug 365931

M  +17   -4    src/crypto/gui/newresultpage.cpp

http://commits.kde.org/kleopatra/26bcc69d99a47435a05d056e5aa37c597c815a31