[GRASS-git] [OSGeo/grass] 6a4b46: d.legend.vect: Initialize title size (#3095)

Vaclav Petras noreply at github.com
Mon Nov 20 11:13:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 6a4b46d6dcb0e3b3d0bca18678c950ee748ba4c9
      https://github.com/OSGeo/grass/commit/6a4b46d6dcb0e3b3d0bca18678c950ee748ba4c9
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2023-11-20 (Mon, 20 Nov 2023)

  Changed paths:
    M display/d.legend.vect/draw.c

  Log Message:
  -----------
  d.legend.vect: Initialize title size (#3095)

Later test (line 270) uses title width to compute background size regardless of title presence, but original code initialized title_w only when title was set.

This fixes occasional extra wide legend background rectangle.

Identified by valgrind as: Conditional jump or move depends on uninitialized value(s).




More information about the grass-commit mailing list