Commit efd0220d authored by Volker Krause's avatar Volker Krause
Browse files

Create IATA BCBP security section object with a QStringView

Accidentally using a temporary QString here results in a use-after-free
issue down the line.

Found thanks to the CI running tests with ASAN.
parent 343d0e74
Pipeline #62603 passed with stages
in 12 minutes and 15 seconds
......@@ -134,7 +134,7 @@ IataBcbpSecuritySection IataBcbp::securitySection() const
for (auto i = 0; i < uniqueMandatorySection().numberOfLegs(); ++i) {
offset += RepeatedMandatorySize + IataBcbpRepeatedMandatorySection(QStringView(m_data).mid(offset)).variableFieldSize();
}
return IataBcbpSecuritySection(m_data.mid(offset));
return IataBcbpSecuritySection(QStringView(m_data).mid(offset));
}
QString IataBcbp::rawData() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment