Bug#1052653: drkonqi-coredump-processor: crash on too few command line arguments
Package: drkonqi
Version: 5.27.8-1
Severity: normal
drkonqi-coredump-processor crashes if too few command line arguments are given:
#0 std::__atomic_base<int>::load (__m=std::memory_order_relaxed,
this=0x0) at /usr/include/c++/13/bits/atomic_base.h:503
#1 QAtomicOps<int>::loadRelaxed<int> (_q_value=...) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:239
#2 QBasicAtomicInteger<int>::loadRelaxed (this=0x0) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:107
#3 QtPrivate::RefCount::ref (this=0x0) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qrefcount.h:55
#4 QString::QString (other=..., this=0x7ffc795b6d50) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1094
#5 main (argc=<optimized out>, argv=<optimized out>) at
./src/coredump/processor/main.cpp:45
The code in question only asserts (which seems to be disabled) that 2
arguments are given:
(https://sources.debian.org/src/drkonqi/5.27.8-1/src/coredump/processor/main.cpp/#L37)
Q_ASSERT(args.size() == 2);
const QString &bootId = args.at(0);
const QString &instance = args.at(1);
auto expectedJournal = owning_ptr_call<sd_journal>(sd_journal_open,
SD_JOURNAL_LOCAL_ONLY);
Q_ASSERT(expectedJournal.ret == 0);
Q_ASSERT(expectedJournal.value);
CoredumpWatcher watcher(std::move(expectedJournal.value), bootId,
instance, nullptr);
Reply to: