[gimp/gimp-2-10] Issue #5735: incorrect condition because of missing parenthesis.
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Issue #5735: incorrect condition because of missing parenthesis.
- Date: Thu, 8 Oct 2020 22:42:33 +0000 (UTC)
commit b5e9bdb5df2a311ba8b670dcab43157b2f9755c9
Author: Jacob Boerema <jgboerema gmail com>
Date: Thu Oct 8 13:54:24 2020 -0400
Issue #5735: incorrect condition because of missing parenthesis.
Also taking the opportunity to change the minimum size since I
apparently counted it wrong. The size always seems to be 46
starting from psp file-version 4 up to and including the current
version 13.
(cherry picked from commit 02bad34a414dbf5ade258efa26903e83dce5524a)
plug-ins/common/file-psp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c
index 50c197484b..c0f3480641 100644
--- a/plug-ins/common/file-psp.c
+++ b/plug-ins/common/file-psp.c
@@ -851,7 +851,7 @@ read_general_image_attribute_block (FILE *f,
chunk_start = ftell (f);
if ((psp_ver_major >= 4
- && (fread (&init_len, 4, 1, f) < 1 || (init_len = GUINT32_FROM_LE (init_len) < 42)))
+ && (fread (&init_len, 4, 1, f) < 1 || ((init_len = GUINT32_FROM_LE (init_len)) < 46)))
|| fread (&ia->width, 4, 1, f) < 1
|| fread (&ia->height, 4, 1, f) < 1
|| fread (&res, 8, 1, f) < 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]