File: ANI-Reject-files-with-multiple-INAM-or-IART-chunks.patch

package info (click to toggle)
gdk-pixbuf 2.42.10%2Bdfsg-1%2Bdeb12u2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 26,504 kB
  • sloc: ansic: 27,270; makefile: 113; python: 110; sh: 73; perl: 56; sed: 16; javascript: 10; xml: 9
file content (36 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Benjamin Gilbert <bgilbert@backtick.net>
Date: Tue, 30 Apr 2024 07:13:37 -0500
Subject: ANI: Reject files with multiple INAM or IART chunks
Origin: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/d52134373594ff76614fb415125b0d1c723ddd56

There should be at most one chunk each.  These would cause memory leaks
otherwise.
---
 gdk-pixbuf/io-ani.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdk-pixbuf/io-ani.c b/gdk-pixbuf/io-ani.c
index a78ea7ace40b..8e8414117c3a 100644
--- a/gdk-pixbuf/io-ani.c
+++ b/gdk-pixbuf/io-ani.c
@@ -445,7 +445,7 @@ ani_load_chunk (AniLoaderContext *context, GError **error)
 	}
         else if (context->chunk_id == TAG_INAM) 
 	{
-		if (!context->animation) 
+		if (!context->animation || context->title)
 		{
 			g_set_error_literal (error,
                                              GDK_PIXBUF_ERROR,
@@ -472,7 +472,7 @@ ani_load_chunk (AniLoaderContext *context, GError **error)
 	}
         else if (context->chunk_id == TAG_IART) 
 	{
-		if (!context->animation) 
+		if (!context->animation || context->author)
 		{
 			g_set_error_literal (error,
                                              GDK_PIXBUF_ERROR,
-- 
2.45.1