Dr. Werner Fink 2020-09-16 08:41:07 +00:00 committed by Git OBS Bridge
parent 2b226d7b37
commit 3d5fa4735f
3 changed files with 51 additions and 2 deletions

39
emacs-27.1-gif.patch Normal file
View File

@ -0,0 +1,39 @@
>>>>> On Tue, 8 Sep 2020 20:38:30 +0700, nnoodle <nnoodle@chiru.no> said:
nnoodle> To reproduce:
nnoodle> $ echo 'GIF89a;' > bad.gif
nnoodle> $ emacs -Q bad.gif
nnoodle> The result will be a segmentation fault.
This should fix it, can you test it?
Thanks
Robert
diff --git a/src/image.c b/src/image.c
index d8c34669cc..6e3b71a869 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8251,7 +8251,7 @@ gif_load (struct frame *f, struct image *img)
Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL);
Lisp_Object specified_data = image_spec_value (img->spec, QCdata, NULL);
EMACS_INT idx;
- int gif_err;
+ int gif_err = 0;
if (NILP (specified_data))
{
@@ -8277,7 +8277,8 @@ gif_load (struct frame *f, struct image *img)
{
#if HAVE_GIFERRORSTRING
image_error ("Cannot open `%s': %s",
- file, build_string (GifErrorString (gif_err)));
+ file, gif_err ? build_string (GifErrorString (gif_err))
+ : build_string ("Unknown error from gif library"));
#else
image_error ("Cannot open `%s'", file);
#endif

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Sep 15 11:30:04 UTC 2020 - Dr. Werner Fink <werner@suse.de>
- Add patch emacs-27.1-gif.patch from upstream mailimng list to fix
crash on broken gig files
- Corect group of el package as well as provide it as devel packages
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Aug 28 13:38:54 UTC 2020 - Dr. Werner Fink <werner@suse.de> Fri Aug 28 13:38:54 UTC 2020 - Dr. Werner Fink <werner@suse.de>

View File

@ -178,6 +178,7 @@ Patch24: emacs-25.2-ImageMagick7.patch
Patch25: emacs-26.1-xft4x11.patch Patch25: emacs-26.1-xft4x11.patch
Patch26: emacs-27.1-pdftex.patch Patch26: emacs-27.1-pdftex.patch
Patch27: emacs-27.1-home.patch Patch27: emacs-27.1-home.patch
Patch28: emacs-27.1-gif.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global include_info %(test -s /usr/share/info/info.info* && echo 0 || echo 1)} %{expand: %%global include_info %(test -s /usr/share/info/info.info* && echo 0 || echo 1)}
@ -242,8 +243,9 @@ Support.
%package -n emacs-el %package -n emacs-el
Requires: emacs = %{version}-%{release} Requires: emacs = %{version}-%{release}
Provides: emacs-devel = %{version}-%{release}
Summary: Several Lisp Files for GNU Emacs Summary: Several Lisp Files for GNU Emacs
Group: Productivity/Text/Editors Group: Development/Libraries/Other
BuildArch: noarch BuildArch: noarch
%description -n emacs-el %description -n emacs-el
@ -252,7 +254,7 @@ files are pre-byte compiled and therefore not necessary.
%package -n emacs-info %package -n emacs-info
Summary: Info files for GNU Emacs Summary: Info files for GNU Emacs
Group: Productivity/Text/Editors Group: Documentation/Other
%if 0%{?suse_version} <= 1500 %if 0%{?suse_version} <= 1500
Requires(post): %install_info_prereq Requires(post): %install_info_prereq
Requires(preun): %install_info_prereq Requires(preun): %install_info_prereq
@ -293,6 +295,7 @@ and most assembler-like syntaxes.
%patch25 -p0 -b .xft %patch25 -p0 -b .xft
%patch26 -p0 -b .fmt %patch26 -p0 -b .fmt
%patch27 -p0 -b .home %patch27 -p0 -b .home
%patch28 -p1 -b .crash
%patch -p0 -b .0 %patch -p0 -b .0
%if %{without tex4pdf} %if %{without tex4pdf}
pushd etc/refcards/ pushd etc/refcards/