From 865cc56894dcb6e1c664a55e4b4010ebf6919e10 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Fri, 29 Sep 2023 20:38:51 +0000 Subject: [PATCH] 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. --- 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 761865e7af..545bd32f7c 100644 --- a/plug-ins/file-psd/psd-util.c +++ b/plug-ins/file-psd/psd-util.c @@ -583,6 +583,7 @@ decode_packbits (const gchar *src, { IFDBG(2) g_debug ("Overrun in packbits replicate of %d chars", n - unpack_left); error_code = 2; + break; } memset (dst, *src, n); src++; -- 2.31.1