[GRASS-git] [OSGeo/grass] 0d3ba7: lib/raster3d: allocate no-cache block tile in the ...

Yann Chemin noreply at github.com
Tue Sep 29 17:22:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 0d3ba7078cbd36b771ea76d2d6af7867b001b0df
      https://github.com/OSGeo/grass/commit/0d3ba7078cbd36b771ea76d2d6af7867b001b0df
  Author: Yann Chemin <dr.yann.chemin at gmail.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M lib/raster3d/getblock.c
    M lib/raster3d/test/test_put_get_value.c

  Log Message:
  -----------
  lib/raster3d: allocate no-cache block tile in the map's internal type (#7952)

Rast3d_get_block_nocache() allocated its scratch tile in the requested
cell type but filled it with Rast3d_read_tile() in the map's internal
type. Reading a DCELL map as FCELL without a tile cache therefore
overflowed the heap buffer (glibc aborts with "double free or
corruption" or "malloc(): corrupted top size").

Allocate the tile in map->typeIntern; the conversion to the requested
type already happens in Rast3d_copy_values(). Add unit tests reading a
DCELL map as FCELL and an FCELL map as DCELL through the no-cache path.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>



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