This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 69bff10a901615f59e25c36c4cb8677b57ebc2d7
Author: Acts1631 <[email protected]>
AuthorDate: Sat Jul 18 09:05:12 2026 -0400

    id3: reject external APIC picture links
    
    APIC link metadata could make an untrusted MP3 load a separate local
    image chosen by the tag. Applications exposing decoded artwork could
    disclose process-readable images.
    
    Reject external APIC links and only process embedded picture data.
---
 src/modules/loaders/loader_id3.c | 44 ++--------------------------------------
 1 file changed, 2 insertions(+), 42 deletions(-)

diff --git a/src/modules/loaders/loader_id3.c b/src/modules/loaders/loader_id3.c
index b28cb3e..b5fe027 100644
--- a/src/modules/loaders/loader_id3.c
+++ b/src/modules/loaders/loader_id3.c
@@ -373,8 +373,8 @@ get_loader(lopt *opt, ImlibLoader **loader)
     {
         if (!strcmp(data, "-->"))
         {
-            *loader = NULL;
-            return 1;
+            E("External picture links are not supported\n");
+            return 0;
         }
         E("Picture frame with unknown mime-type \'%s\' found\n", data);
         return 0;
@@ -536,46 +536,6 @@ _load(ImlibImage *im, int load_data)
 
         unlink(tmp);
     }
-    else
-    {
-        /* The tag actually provides a image url rather than image data.
-         * Practically, dunno if such a tag exists on earth :)
-         * Here's the code anyway...
-         */
-        union id3_field *field;
-        id3_length_t    length;
-        char const     *data;
-        char           *url, *file;
-
-        field = id3_frame_field
-            (id3_tag_get_frame(opt.ctx->tag, opt.index - 1), 4);
-        data = "" const *)id3_field_getbinarydata(field, &length);
-        if (!data || !length)
-        {
-            E("No link image URL present\n");
-            goto quit;
-        }
-        url = "" *)malloc((length + 1) * sizeof(char));
-        strncpy(url, data, length);
-        url[length] = '\0';
-        file = (strncmp(url, "file://", 7) ? url : url + 7);
-        if (!(loader = __imlib_FindBestLoader(file, NULL, 0)))
-        {
-            E("No loader found for file %s\n", file);
-            free(url);
-            goto quit;
-        }
-
-        rc = __imlib_LoadEmbedded(loader, im, load_data, file);
-
-#if USE_TAGS
-        if (!im->loader)
-            __imlib_AttachTag(im, "id3-link-url", 0, url, destructor_data);
-        else
-#endif
-            free(url);
-    }
-
 #if USE_TAGS
     if (!im->loader)
         write_tags(im, &opt);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to