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

r.cost, r.walk: Fix integer overflows for percentages for large regions #2842

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

metzm
Copy link
Contributor

@metzm metzm commented Feb 20, 2023

r.cost and r.walk do not report correct percentages on the progress of the actual cost analysis for regions larger than INT_MAX (at most 2³¹ - 1) cells. Further on, memory allocation for the flag structure may fail.

Needs to be backported to all maintained GRASS 8 branches.

@metzm metzm added bug Something isn't working backport_needed raster Related to raster data processing C Related code is in C labels Feb 20, 2023
@metzm metzm added this to the 8.5.0 milestone Feb 20, 2023
@wenzeslaus wenzeslaus modified the milestones: 8.5.0, 8.3.0 Feb 20, 2023
@neteler neteler changed the title fix integer overflows in r.cost and r.walk r.cost and r.walk: fix integer overflows Feb 20, 2023
@neteler
Copy link
Member

neteler commented Feb 20, 2023

(PR title renamed to make release note generator happy: https://github.com/OSGeo/grass/blob/main/utils/release.yml)

metzm added a commit to metzm/grass that referenced this pull request Feb 20, 2023
@metzm metzm merged commit b06c460 into OSGeo:main Feb 20, 2023
@metzm metzm deleted the r_cost_r_walk_large_region branch February 20, 2023 21:27
metzm added a commit that referenced this pull request Feb 21, 2023
@wenzeslaus wenzeslaus changed the title r.cost and r.walk: fix integer overflows r.cost, r.walk: Fix integer overflows for percentages for large regions Jun 6, 2023
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C Related code is in C raster Related to raster data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants