little-brother / sqlite-gui

Lightweight SQLite editor for Windows
GNU General Public License v2.0
1.07k stars 51 forks source link

Do not use negative index into queryElapsedTimes #138

Closed skeeto closed 1 year ago

skeeto commented 1 year ago

TabCtrl_GetCurSel may return -1, which causes an out of bounds access into the array. This was caught using Undefined Behavior Sanitizer.

little-brother commented 1 year ago

Thanks. It's mostly impossible but I added it.