Qt: Fix column validation in columnString()

The column parameter in PacketListRecord::columnString() must be
below cap_file->cinfo.num_cols to be valid. An issue with this check
may be triggered when switching profile.
This commit is contained in:
Stig Bjørlykke 2021-11-20 16:31:25 +01:00
parent 5a7c23c5da
commit a8643ab254
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ const QString PacketListRecord::columnString(capture_file *cap_file, int column,
// packet_list_store.c:packet_list_get_value
Q_ASSERT(fdata_);
if (!cap_file || column < 0 || column > cap_file->cinfo.num_cols) {
if (!cap_file || column < 0 || column >= cap_file->cinfo.num_cols) {
return QString();
}