1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
From: Markus Koschany <apo@debian.org>
Date: Mon, 21 Mar 2016 22:41:30 +0100
Subject: CVE-2014-9763
Prevent division-by-zero crashes.
Origin: https://git.enlightenment.org/legacy/imlib2.git/commit/?h=v1.4.7&id=c21beaf1780cf3ca291735ae7d58a3dde63277a2
---
src/modules/loaders/loader_pnm.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/modules/loaders/loader_pnm.c b/src/modules/loaders/loader_pnm.c
index f974ed5..172740e 100644
--- a/src/modules/loaders/loader_pnm.c
+++ b/src/modules/loaders/loader_pnm.c
@@ -229,7 +229,7 @@ load(ImlibImage * im, ImlibProgressFunction progress,
}
}
iptr = idata;
- if (v == 255)
+ if (v == 0 || v == 255)
{
for (x = 0; x < w; x++)
{
@@ -303,7 +303,7 @@ load(ImlibImage * im, ImlibProgressFunction progress,
}
}
iptr = idata;
- if (v == 255)
+ if (v == 0 || v == 255)
{
for (x = 0; x < w; x++)
{
@@ -376,7 +376,7 @@ load(ImlibImage * im, ImlibProgressFunction progress,
break;
ptr = data;
- if (v == 255)
+ if (v == 0 || v == 255)
{
for (x = 0; x < w; x++)
{
@@ -418,7 +418,7 @@ load(ImlibImage * im, ImlibProgressFunction progress,
break;
ptr = data;
- if (v == 255)
+ if (v == 0 || v == 255)
{
for (x = 0; x < w; x++)
{
@@ -493,7 +493,7 @@ load(ImlibImage * im, ImlibProgressFunction progress,
break;
ptr = data;
- if (v == 255)
+ if (v == 0 || v == 255)
{
for (x = 0; x < w; x++)
{
|