mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-25 11:24:54 +02:00
bd4a469adb
In `SVGStartElement`, the `gradientTransform` and `transform` attribute handlers reassign `value` to `tokens[j+1]` inside the inner token-parsing loop. After the loop, all tokens are freed via `DestroyString()`. The outer attribute loop then calls `DestroyString(value)`, which double-frees the already-destroyed token string, causing SIGABRT. Use a separate `token_value` local variable inside each inner loop instead of reassigning `value`, so the outer loop's `DestroyString(value)` frees the original `SVGEscapeString()`-allocated string exactly once. Add regression test for SVG `gradientTransform` (#8582). Fixes ImageMagick/ImageMagick#8582 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
357 B
357 B