Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_28] wmsgetcapabilities: Do not set a dimension default value if there are none #51933

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

qgis-bot
Copy link
Collaborator

Backport #51930
Authored by: @ptitjano

The WMS getCapabilities response tries to set a default value on
multi-dimensional data. However, if the `values` list is empty, this
can result in a segmentation fault because it can call
`values.first()` or `values.last()` which is non valid for an empty
list.

This issue is fixed by checking if `values` list is empty before
calling `values.first()` and `values.last()`.

According to the WMS specification, the default parameter is
optional. Therefore, in this case, the response is still valid.
@github-actions github-actions bot added this to the 3.28.4 milestone Feb 20, 2023
@nyalldawson nyalldawson merged commit 6a41b56 into release-3_28 Feb 20, 2023
@nyalldawson nyalldawson deleted the backport-51930-to-release-3_28 branch February 20, 2023 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants