Subject: bug#76414: 31.0.50; can't paste images with yank-media

From: Visuwesh <[email-masked]>
Date: Sun, 23 Feb 2025 09:46:58 +0530

[சனி பிப்ரவரி 22, 2025] the_wurfkreuz wrote:

>>> could you please check if reverting ff65cc9944dc0b37986d512ee8b9817c6913db36 fixes the
> issue?
>
> Reverting the commit fixes the issue.

Paul, can you please take a look at this bug report?  Your recent commit

    commit ff65cc9944dc0b37986d512ee8b9817c6913db36
    Author: Paul Eggert <[email-masked]>
    Date:   Sun Jan 26 22:15:49 2025 -0800

        Pacify GCC in pgtkselect malloc alignment

        * src/pgtkselect.c (pgtk_size_for_format): Remove.
        (pgtk_get_window_property): Third arg is now void **, not unsigned
        char **.  Omit last arg.  All callers changed.  Simplify
        allocation to pacify GCC 14.2.1 complaint about malloc size
        mismatching size of array: there’s no need for an extra byte when
        converting from ldata to idata.
        (selection_data_to_lisp_data): Third arg is now void const *,
        not unsigned char const *.  All callers changed.
        Omit unnecessary casts.  Make some locals more local.

seems to have introduced a regression.  Details of reproduction are in
OP.