Bug 293005

Summary: Klipper crashes when trying to generate datamatrix code with to many bytes inside clipboard
Product: [Unmaintained] klipper Reporter: Patrick Eigensatz <patrick.eigensatz>
Component: generalAssignee: Esben Mose Hansen <kde>
Status: RESOLVED DUPLICATE    
Severity: minor CC: adaptee
Priority: NOR    
Version: 0.9.6   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Hopefully a working patch for this bug

Description Patrick Eigensatz 2012-01-31 23:40:46 UTC
Version:           0.9.6 (using KDE 4.6.2) 
OS:                Linux

According to Wikipedia (http://en.wikipedia.org/wiki/Data_Matrix) a Data Matrix Code can store up to 1556 bytes. If I select more than 1556 bytes, and I try to create a data matrix code, it crashes.

Reproducible: Always

Steps to Reproduce:
Copy a long text into clipboard and try to generate a barcode.

Actual Results:  
Klipper crashes, because this type of barcode can only store up to 1556 bytes.

Expected Results:  
Probably show a message that it isn't possible to create a barcode of the whole text?
Comment 1 Patrick Eigensatz 2012-02-01 00:18:24 UTC
Created attachment 68384 [details]
Hopefully a working patch for this bug

When I saw that the bug also seems to appear in the Git repository,
I tried to create a patch to fix that bug. I am a (beginning) C programmer, and I don't have any experience about classes in C++, but this patch should work.
Hope it does!
Comment 2 Jekyll Wu 2012-02-01 02:11:04 UTC
You might be interested with reading bug 283300 and try building both klipper and libprison from git repository.
Comment 3 Patrick Eigensatz 2012-02-01 07:51:06 UTC

*** This bug has been marked as a duplicate of bug 291529 ***