From f131d4feacfd86825d255effd02cde15373e6fc3 Mon Sep 17 00:00:00 2001
From: Alx Sa <cmyk.student@gmail.com>
Date: Fri, 29 Sep 2023 20:39:29 +0000
Subject: plug-ins: Fix vulnerability in file-psd

Resolves #10101.
This patch adds a missing break statement after an error condition
is detected to prevent the code from continuing afterwards.

Origin:
https://gitlab.gnome.org/GNOME/gimp/-/commit/985c0a20e18b5b3b8a48ee9cb12287b1d5732d3d
---
 plug-ins/file-psd/psd-util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plug-ins/file-psd/psd-util.c b/plug-ins/file-psd/psd-util.c
index f71a57bdd6..4b6507b5de 100644
--- a/plug-ins/file-psd/psd-util.c
+++ b/plug-ins/file-psd/psd-util.c
@@ -519,6 +519,7 @@ decode_packbits (const gchar *src,
             {
               IFDBG(2) g_debug ("Overrun in packbits replicate of %d chars", n - unpack_left);
               error_code = 2;
+              break;
             }
           dat = *src;
           for (; n > 0; --n)
-- 
2.30.2

