[gimp] plug-ins: don't crash loading a transparent indexed png
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: don't crash loading a transparent indexed png
- Date: Mon, 9 Jul 2012 16:09:11 +0000 (UTC)
commit d3e68fc995066075686157a49a9fd5b67a77d5af
Author: Massimo Valentini <mvalentini src gnome org>
Date: Mon Jul 9 18:04:08 2012 +0200
plug-ins: don't crash loading a transparent indexed png
with no text chunk, in that case 'i' == tile_height and
*** glibc detected *** ...2.0/plug-ins/file-png:
double free or corruption (out): 0x00000000011af590 ***
plug-ins/common/file-png.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index e95d9fd..dc35885 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -1210,8 +1210,8 @@ load_image (const gchar *filename,
while (iter->length--)
{
- data[i * 2 + 1] = alpha[data[i * 2]];
- data[i * 2] -= empty;
+ data[1] = alpha[data[0]];
+ data[0] -= empty;
data += n_components;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]