From 07f3220baf068445eeb397558de421eff00bad51 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Fri, 8 Nov 2013 14:21:46 +0100 Subject: [PATCH] file-bmp: don't close already closed FD --- gimp-2.8.8-static-code-check.patch | 26 +++++++++++++++++++++----- gimp.spec | 5 ++++- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/gimp-2.8.8-static-code-check.patch b/gimp-2.8.8-static-code-check.patch index 362022c..a00667a 100644 --- a/gimp-2.8.8-static-code-check.patch +++ b/gimp-2.8.8-static-code-check.patch @@ -1,12 +1,20 @@ -From 539e584bfaa7e05799f23105500e598e26f62ccf Mon Sep 17 00:00:00 2001 +From 6b545bc7153ba5ed9810ac55b59b00af2b1dd8e9 Mon Sep 17 00:00:00 2001 From: Nils Philippsen -Date: Thu, 7 Nov 2013 13:11:50 +0100 +Date: Fri, 8 Nov 2013 14:14:19 +0100 Subject: [PATCH] patch: static-code-check Fix problems found during static code check (Coverity). Squashed commit of the following: +commit 2effab4087246e4eb45f8132e88b23b57b92bb19 +Author: Nils Philippsen +Date: Fri Nov 8 14:02:03 2013 +0100 + + file-bmp: don't close foreign FD in ReadImage() + + (cherry picked from commit 4664c1f479e7768d08ed5198bed2251e6aa0464c) + commit 8c8f939a7760e606191681003bc868f6aef721d3 Author: Nils Philippsen Date: Thu Nov 7 12:28:28 2013 +0100 @@ -72,9 +80,9 @@ Date: Thu Nov 7 11:33:19 2013 +0100 modules/color-selector-cmyk-lcms.c | 2 +- modules/gimpcolorwheel.c | 2 +- plug-ins/common/lcms.c | 15 ++++++++---- - plug-ins/file-bmp/bmp-read.c | 47 ++++++++++++++++++++----------------- + plug-ins/file-bmp/bmp-read.c | 48 +++++++++++++++++++------------------ plug-ins/file-jpeg/jpeg-load.c | 12 +++++----- - 6 files changed, 50 insertions(+), 40 deletions(-) + 6 files changed, 50 insertions(+), 41 deletions(-) diff --git a/app/widgets/gimpdeviceinfo-coords.c b/app/widgets/gimpdeviceinfo-coords.c index 0b72a2b..f6b74ca 100644 @@ -159,7 +167,7 @@ index 87373fc..5974aaa 100644 gtk_widget_destroy (dialog); diff --git a/plug-ins/file-bmp/bmp-read.c b/plug-ins/file-bmp/bmp-read.c -index 7e70fbd..0055e67 100644 +index 7e70fbd..e59dfb8 100644 --- a/plug-ins/file-bmp/bmp-read.c +++ b/plug-ins/file-bmp/bmp-read.c @@ -193,7 +193,7 @@ ReadBMP (const gchar *name, @@ -362,6 +370,14 @@ index 7e70fbd..0055e67 100644 return image_ID; } +@@ -917,7 +920,6 @@ ReadImage (FILE *fd, + break; + } + +- fclose (fd); + if (bpp <= 8) + for (i = 0, j = 0; i < ncols; i++) + { diff --git a/plug-ins/file-jpeg/jpeg-load.c b/plug-ins/file-jpeg/jpeg-load.c index 3609029..4ae7eb2 100644 --- a/plug-ins/file-jpeg/jpeg-load.c diff --git a/gimp.spec b/gimp.spec index 610bcd7..4bcafc6 100644 --- a/gimp.spec +++ b/gimp.spec @@ -82,7 +82,7 @@ Summary: GNU Image Manipulation Program Name: gimp Epoch: 2 Version: 2.8.8 -Release: %{?prerelprefix}2%{dotprerel}%{dotgitrev}%{?dist} +Release: %{?prerelprefix}3%{dotprerel}%{dotgitrev}%{?dist} # Compute some version related macros # Ugly hack, you need to get your quoting backslashes/percent signs straight @@ -623,6 +623,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Fri Nov 08 2013 Nils Philippsen - 2:2.8.8-3 +- file-bmp: don't close already closed FD + * Thu Nov 07 2013 Nils Philippsen - 2:2.8.8-2 - fix crash in lcms plug-in - fix issues found during static code check