Bug 272427

Summary: K3b krash
Product: [Applications] k3b Reporter: Eugen <basker2007>
Component: generalAssignee: Michał Małek <michalm>
Status: RESOLVED FIXED    
Severity: crash CC: trueg
Priority: NOR    
Version: 2.0.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=328529
Latest Commit: Version Fixed In: 2.0.3

Description Eugen 2011-05-04 11:22:41 UTC
Application: k3b (2.0.1)
KDE Platform Version: 4.5.5 (KDE 4.5.5)
Qt Version: 4.7.0
Operating System: Linux 2.6.38-020638-generic i686
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
I try open application K3b. But it not open and kde show me krash report.

-- Backtrace:
Application: K3b (k3b), signal: Segmentation fault
[Current thread is 1 (Thread 0xb347b710 (LWP 3616))]

Thread 3 (Thread 0xaeeffb70 (LWP 3634)):
[KCrash Handler]
#7  0xb77ff987 in K3b::Device::from2Byte(unsigned char*) () from /usr/lib/libk3bdevice.so.6
#8  0xb77e465b in K3b::Device::Device::determineSupportedWriteSpeeds() const () from /usr/lib/libk3bdevice.so.6
#9  0xb76cba3c in K3b::Medium::update() () from /usr/lib/libk3blib.so.6
#10 0xb76cfd1a in K3b::MediaCache::PollThread::run() () from /usr/lib/libk3blib.so.6
#11 0xb4ec1df9 in QThreadPrivate::start (arg=0x90a3b50) at thread/qthread_unix.cpp:266
#12 0xb4e4bcc9 in start_thread () from /lib/libpthread.so.0
#13 0xb414769e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xae6feb70 (LWP 3635)):
#0  0xb782f424 in __kernel_vsyscall ()
#1  0xb4e50884 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4ec133e in thread_sleep (ti=0x1) at thread/qthread_unix.cpp:416
#3  0xb4ec14e0 in QThread::sleep (secs=2) at thread/qthread_unix.cpp:430
#4  0xb76cfda9 in K3b::MediaCache::PollThread::run() () from /usr/lib/libk3blib.so.6
#5  0xb4ec1df9 in QThreadPrivate::start (arg=0x90b8a88) at thread/qthread_unix.cpp:266
#6  0xb4e4bcc9 in start_thread () from /lib/libpthread.so.0
#7  0xb414769e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb347b710 (LWP 3616)):
#0  0xb782f424 in __kernel_vsyscall ()
#1  0xb4140371 in select () from /lib/libc.so.6
#2  0xb4fef872 in qt_safe_select (nfds=11, fdread=0xbf88ff6c, fdwrite=0xbf88feec, fdexcept=0x0, orig_timeout=0x0) at kernel/qcore_unix.cpp:82
#3  0xb4f9be3e in select_msecs (nfds=11, fdread=0xbf88ff6c, fdwrite=0xbf88feec, timeout=-1) at io/qprocess_unix.cpp:885
#4  0xb4f9cf0a in QProcessPrivate::waitForFinished (this=0x90fc2c8, msecs=-1) at io/qprocess_unix.cpp:1101
#5  0xb4f57a1e in QProcess::waitForFinished (this=0xbf8900a4, msecs=-1) at io/qprocess.cpp:1742
#6  0xaf9103c6 in ?? () from /usr/lib/kde4/k3bsoxencoder.so
#7  0xb7698b54 in K3b::ExternalBinManager::search() () from /usr/lib/libk3blib.so.6
#8  0xb7699807 in K3b::ExternalBinManager::readConfig(KConfigGroup const&) () from /usr/lib/libk3blib.so.6
#9  0xb768cb04 in K3b::Core::readSettings(KSharedPtr<KSharedConfig>) () from /usr/lib/libk3blib.so.6
#10 0x0815af34 in _start ()

Reported using DrKonqi
Comment 1 Michał Małek 2011-07-09 22:37:51 UTC
Git commit 61ee818030f29e57556248adf1398b6c9e5ee7de by Michal Malek.
Committed on 10/07/2011 at 00:03.
Pushed by mmalek into branch '2.0'.

Fixed crash on detecting writing speeds

Device::Device::determineSupportedWriteSpeeds() method
lacked checking if data array is of enough size before accessing
it.

BUG: 272427
FIXED-IN: 2.0.3

Conflicts:

	libk3bdevice/k3bdevice.cpp
	libk3bdevice/k3bdevice_mmc.cpp

M  +1    -0    ChangeLog     
M  +1    -1    libk3bdevice/k3bdevice.cpp     

http://commits.kde.org/k3b/61ee818030f29e57556248adf1398b6c9e5ee7de
Comment 2 Michał Małek 2011-07-09 22:37:52 UTC
Git commit 1ea92f39d2e4de81e38c3bed511350b07e9b7840 by Michal Malek.
Committed on 10/07/2011 at 00:03.
Pushed by mmalek into branch 'master'.

Fixed crash on detecting writing speeds

In method K3b::Device::Device::modeSense() page data is initially
resized to 0xFFFF, the page date is being read and then the actual
size of the page is obtained from the data itself. The problem was,
after reading the actual size, data was not resized back to it.
Additionally, Device::Device::determineSupportedWriteSpeeds() method
lacked checking if data array is of enough size before accessing it.

BUG: 272427
FIXED-IN: 2.0.3

M  +1    -0    ChangeLog     
M  +2    -2    libk3bdevice/k3bdevice.cpp     
M  +6    -12   libk3bdevice/k3bdevice.h     
M  +3    -3    libk3bdevice/k3bdevice_mmc.cpp     
M  +2    -2    libk3bdevice/k3bdeviceglobals.cpp     
M  +2    -2    libk3bdevice/k3bdeviceglobals.h     

http://commits.kde.org/k3b/1ea92f39d2e4de81e38c3bed511350b07e9b7840