[gimp/soc-2011-seamless-clone2] file-gif-load: Fix incorrect out-of-input-bits condition (#695513)
- From: Clayton Walker <claytonw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-seamless-clone2] file-gif-load: Fix incorrect out-of-input-bits condition (#695513)
- Date: Wed, 8 May 2013 15:05:20 +0000 (UTC)
commit f6655a8a52760ca26ba13aadfda38f6fe788b2e0
Author: Mukund Sivaraman <muks banu com>
Date: Tue Mar 12 13:08:14 2013 +0530
file-gif-load: Fix incorrect out-of-input-bits condition (#695513)
GetCode() erroneously assumes that it has run out of input bits, because
it's off by 1 in its size calculation. At the end of the block, if the
End-of-Information code is exactly at the block boundary, it calculates
that it needs to read an extra bit, and tries to read beyond the end of
the block. It fails then, and the End-of-Information code is not
processed, and other warnings/errors are generated.
plug-ins/common/file-gif-load.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/file-gif-load.c b/plug-ins/common/file-gif-load.c
index e01dfe6..7fbf292 100644
--- a/plug-ins/common/file-gif-load.c
+++ b/plug-ins/common/file-gif-load.c
@@ -685,7 +685,7 @@ GetCode (FILE *fd,
return 0;
}
- while ((curbit + code_size) >= lastbit)
+ while ((curbit + code_size) > lastbit)
{
if (done)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]