[GRASS-git] [OSGeo/grass] 961201: tools: Fix multiplications converted to a larger t...

Corey White noreply at github.com
Mon Aug 24 20:55:16 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 961201997595e56cde5dfa4660f3dda3d1bfeb09
      https://github.com/OSGeo/grass/commit/961201997595e56cde5dfa4660f3dda3d1bfeb09
  Author: Corey White <smortopahri at gmail.com>
  Date:   2026-08-25 (Tue, 25 Aug 2026)

  Changed paths:
    M display/d.graph/do_graph.c
    M display/d.legend/draw.c
    M imagery/i.segment/flag.c
    M raster3d/r3.in.v5d/main.c
    M raster3d/r3.out.v5d/main.c
    M vector/v.vol.rst/user3.c
    M visualization/ximgview/color.c

  Log Message:
  -----------
  tools: Fix multiplications converted to a larger type (#7708)

* tools: Fix multiplications converted to a larger type

Cast the first operand so that integer products used as allocation
sizes, memset lengths, cell counts, and file offsets are computed in
size_t, long, or off_t instead of int, and so that int or float
products consumed as double (D_text_size, floor, region bounds) are
computed in double.

Fixes 24 CodeQL cpp/integer-multiplication-cast-to-long alerts across
display, general, imagery, raster3d, vector, and visualization tools.

* removed cases that require further investigation



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