Bug 486134 - Crash when opening an IFF data (?) file
Summary: Crash when opening an IFF data (?) file
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 24.02.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 486623 486762 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-04-25 22:10 UTC by Jonas Baecker
Modified: 2024-05-08 11:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Process 8633 (kate) of user 1000 dumped core. (9.96 KB, text/plain)
2024-04-25 22:10 UTC, Jonas Baecker
Details
An example of a file that's causing the crash (142.94 KB, application/octet-stream)
2024-04-25 22:11 UTC, Jonas Baecker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Baecker 2024-04-25 22:10:25 UTC
Created attachment 168908 [details]
Process 8633 (kate) of user 1000 dumped core.

SUMMARY
Kate will crash immediately when opening the file. Note that this file is not actually meant to be readable by Kate, but Dolphin identified it as a text file for me so I tried opening it. The "file" command identifies the file as an IFF file, it's from an old video game "Urban Assault". All the *.BAS files that come with this game seem to cause a crash, I have uploaded one that has a small filesize for testing.


STEPS TO REPRODUCE
1. Try opening the file "xc.BAS"
2. Kate should crash

OBSERVED RESULT
Kate crashing.

EXPECTED RESULT
Kate not crashing and perhaps showing a warning that the file is not a text file.

SOFTWARE/OS VERSIONS
Linux: 6.8.6
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Comment 1 Jonas Baecker 2024-04-25 22:11:16 UTC
Created attachment 168909 [details]
An example of a file that's causing the crash
Comment 2 Christoph Cullmann 2024-04-27 18:42:20 UTC
Git commit 990d5a34a699b61bbf321b4081afc9deb2f00f9b by Christoph Cullmann.
Committed on 27/04/2024 at 18:42.
Pushed by cullmann into branch 'master'.

fix crashs and OOM on load with encoding failures
Related: bug 486195

M  +51   -0    autotests/src/katetextbuffertest.cpp
M  +1    -0    src/buffer/katetextloader.h

https://invent.kde.org/frameworks/ktexteditor/-/commit/990d5a34a699b61bbf321b4081afc9deb2f00f9b
Comment 3 Christoph Cullmann 2024-04-27 18:44:55 UTC
Thanks for the report, was easy to reproduce, fixed and added some test to avoid regressions.
Comment 4 Christoph Cullmann 2024-05-05 17:24:39 UTC
*** Bug 486623 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Cullmann 2024-05-08 11:39:03 UTC
*** Bug 486762 has been marked as a duplicate of this bug. ***