[gdk-pixbuf] tga: Only check for as many pixels as are actually needed
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] tga: Only check for as many pixels as are actually needed
- Date: Tue, 13 Oct 2015 01:01:18 +0000 (UTC)
commit 118bdf49b7c9c4239f9a6cb3bbeb40fccdbaaf33
Author: Benjamin Otte <otte redhat com>
Date: Mon Sep 21 23:34:28 2015 +0200
tga: Only check for as many pixels as are actually needed
gdk-pixbuf/io-tga.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk-pixbuf/io-tga.c b/gdk-pixbuf/io-tga.c
index b915d98..7500359 100644
--- a/gdk-pixbuf/io-tga.c
+++ b/gdk-pixbuf/io-tga.c
@@ -415,7 +415,7 @@ tga_load_rle_image (TGAContext *ctx,
tag = *s;
s++, n++;
if (tag & 0x80) {
- if (n + bytes_per_pixel >= size) {
+ if (n + bytes_per_pixel > size) {
--n;
break;
} else {
@@ -433,7 +433,7 @@ tga_load_rle_image (TGAContext *ctx,
}
} else {
raw_num = tag + 1;
- if (n + (raw_num * bytes_per_pixel) >= size) {
+ if (n + (raw_num * bytes_per_pixel) > size) {
--n;
break;
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]