[GRASS-git] [OSGeo/grass] d4b639: v.class: Fix out-of-bounds read when no records ar...
Anna Petrasova
noreply at github.com
Tue Jul 14 03:42:20 PDT 2026
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: d4b639dccb5f9204648b68ae1e38dcde92137b8e
https://github.com/OSGeo/grass/commit/d4b639dccb5f9204648b68ae1e38dcde92137b8e
Author: Anna Petrasova <kratochanna at gmail.com>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M lib/arraystats/class.c
M vector/v.class/main.c
M vector/v.class/tests/test_v_class.py
Log Message:
-----------
v.class: Fix out-of-bounds read when no records are selected (#7692)
An empty WHERE result left an empty data array, which the classification
algorithms then indexed at data[0] and data[count - 1]. The values printed
as class breaks were whatever the heap happened to hold, which is zeroed
on Linux but not on Windows, making the test flaky there.
Warn the user and keep the zero-initialized breaks when nothing is selected, and
reject an empty array in AS_class_apply_algorithm.
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list