ea4k / klog

KLog is a multiplatform free hamradio logger. It runs natively on Linux, macOS and Windows.
https://www.klog.xyz
GNU General Public License v3.0
76 stars 25 forks source link

Bug: double free in MainWindow #726

Closed ikbenkous closed 3 months ago

ikbenkous commented 5 months ago

It seems that here that instead of exchanging values, memory addresses are being copied: https://github.com/ea4k/klog/blob/527eb868bdbf35c96676e3166497509cedf5603b/src/mainwindow.cpp#L2213

And here they're manually deleted: https://github.com/ea4k/klog/blob/527eb868bdbf35c96676e3166497509cedf5603b/src/mainwindow.cpp#L254-L255

I believe this is a double free and is fixed by changing the line on 2213 to this: *dateTimeTemp = *dateTime; I do not know if this is the intent of the original coder or if it makes any sense at all. lmao