Stabilize filename hash#21133
Merged
Merged
Conversation
Collaborator
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.
…s after file name to influence hash
…rams; watermark migration fixes
Collaborator
|
In short - YES! |
jenshannoschwalm
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.