Skip to content

Stabilize filename hash#21133

Merged
TurboGit merged 2 commits into
darktable-org:masterfrom
kofa73:stabilize-filename-hash
May 26, 2026
Merged

Stabilize filename hash#21133
TurboGit merged 2 commits into
darktable-org:masterfrom
kofa73:stabilize-filename-hash

Conversation

@kofa73
Copy link
Copy Markdown
Collaborator

@kofa73 kofa73 commented May 25, 2026

  • Cache stability: filename buffers in module->params were not zero-filled before g_strlcpy, so trailing junk bytes unpredictably shifted piece->hash even when the user reselected the same file. Added dt_strlcpy_to_fixed (memset + g_strlcpy). Applied to colorin, colorout, overlay, rasterfile, watermark (filename and font).
  • Watermark legacy_params missing migration: v1–v5 -> v6 left scale_img and scale_svg uninitialised (malloc'd params, comment claimed "default values" but none were ever set). Now set to DT_SCALE_IMG_LARGER / DT_SCALE_SVG_WIDTH (current defaults in dt_iop_watermark_params_t).
  • Watermark legacy_params suspicious migration: v2 already has sizeto, but v2 -> v6 hard-coded scale_base = DT_SCALE_MAINMENU_IMAGE. v3/v4/v5 assign scale_base from o->sizeto; now v2->v6 does that, too.

@kofa73 kofa73 requested a review from jenshannoschwalm May 25, 2026 16:33
@jenshannoschwalm
Copy link
Copy Markdown
Collaborator

In short - YES!

Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit TurboGit merged commit 0aec951 into darktable-org:master May 26, 2026
5 checks passed
@TurboGit TurboGit added this to the 5.6 milestone May 26, 2026
@TurboGit TurboGit added bugfix pull request fixing a bug scope: codebase making darktable source code easier to manage labels May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug scope: codebase making darktable source code easier to manage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants