HttpRequest: avoid UB in content disposition header parsing
When parsing the header, we were unconditionally accessing the
element of the list at index 1. This is UB if the list has less
than two elements, so add an explicit check.
Change-Id: Ibfc3d4949fa75e5cdd78d06eb0962f7df0d29b4e
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
| commit | fa4205a09329a1974263f475790b0f3efc0da93f |
| parent | e5ed7ad29715ca90b624910cc1a6f439e74e16b6 |
| author | Ivan Solovev <ivan.solovev@qt.io> |
| committer | Ivan Solovev <ivan.solovev@qt.io> |
| commit time | Wed, 10 Sep 2025 11:53:07 +0200 |
- M src/main/resources/cpp-qt6-client/HttpRequest.cpp.mustache
- M tests/auto/colorpalette/client/client/QtOAIHttpRequest.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIHttpRequest.cpp
- M tests/auto/mediatype/client/client/QtOAIHttpRequest.cpp
- M tests/auto/openapi2.0/client/client/QtOAIHttpRequest.cpp
- M tests/auto/operation-parameters/client/client/QtOAIHttpRequest.cpp
- M tests/auto/petstore/client/client/QtOAIHttpRequest.cpp
- M tests/auto/petstore/qmlclient/client/OAIHttpRequest.cpp