[gimp/gimp-2-8] file-gif-load: Fail early if GetCode() fails (Bug #737375)
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] file-gif-load: Fail early if GetCode() fails (Bug #737375)
- Date: Thu, 25 Sep 2014 17:21:47 +0000 (UTC)
commit eb8947d5112ff2632d9f56275a85b7582cb83a27
Author: Mukund Sivaraman <muks banu com>
Date: Thu Sep 25 22:48:33 2014 +0530
file-gif-load: Fail early if GetCode() fails (Bug #737375)
(cherry picked from commit 55150487ff9ed53ecb90ae4fca3d615e24057fae)
plug-ins/common/file-gif-load.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/file-gif-load.c b/plug-ins/common/file-gif-load.c
index 547b975..c981ec2 100644
--- a/plug-ins/common/file-gif-load.c
+++ b/plug-ins/common/file-gif-load.c
@@ -745,7 +745,10 @@ LZWReadByte (FILE *fd,
max_code_size = 2 * clear_code;
max_code = clear_code + 2;
- GetCode (fd, 0, TRUE);
+ if (GetCode (fd, 0, TRUE) < 0)
+ {
+ return -1;
+ }
fresh = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]