diff --git a/sdcc-2.9.0-r5476-fix-doublefree.diff b/sdcc-2.9.0-r5476-fix-doublefree.diff new file mode 100644 index 0000000..ab69503 --- /dev/null +++ b/sdcc-2.9.0-r5476-fix-doublefree.diff @@ -0,0 +1,20 @@ +--- trunk/sdcc/as/link/lkar.c 2009/07/18 08:25:57 5475 ++++ trunk/sdcc/as/link/lkar.c 2009/07/18 09:11:36 5476 +@@ -454,8 +454,6 @@ + { + long moduleOffset = ftell (libfp); + +- free (obj_name); +- + /* Opened OK - create a new libraryfile object for it */ + if (This == NULL) + { +@@ -484,7 +482,7 @@ + + add_rel_index (libfp, hdr.ar_size, This); + +- fseek (libfp, moduleOffset + hdr.ar_size + (hdr.ar_size & 1), SEEK_SET); ++ fseek (libfp, moduleOffset + hdr.ar_size + (hdr.ar_size & 1), SEEK_SET);; + } + } + diff --git a/sdcc.spec b/sdcc.spec index 6dca8b6..5cb8c61 100644 --- a/sdcc.spec +++ b/sdcc.spec @@ -1,6 +1,6 @@ Name: sdcc Version: 2.9.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Small Device C Compiler Group: Applications/Engineering License: GPLv2+ @@ -9,8 +9,7 @@ Source0: http://downloads.sourceforge.net/sdcc/sdcc-src-%{version}.tar.bz Source1: README.fedora Patch0: sdcc-2.9.0-patch-out-getline.diff Patch1: sdcc-2.9.0-configure.diff -#Patch1: sdcc-2.8.0-debugger-makefile.diff -#Patch2: sdcc-2.8.0-doc-lyx.diff +Patch2: sdcc-2.9.0-r5476-fix-doublefree.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf @@ -56,8 +55,7 @@ Emacs extensions for SDCC. %setup -q -n sdcc %patch0 -p1 %patch1 -p1 -#%%patch1 -p0 -#%%patch2 -p1 +%patch2 -p2 find -name '*.[ch]' -exec chmod -x '{}' \; # Extract %%__os_install_post into os_install_post~ @@ -137,6 +135,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jul 20 2009 Conrad Meyer - 2.9.0-3 +- Fix double-free (rhbz# 509278) with patch from upstream. + * Wed Jul 1 2009 Conrad Meyer - 2.9.0-2 - Fix #454205 by BR'ing gputils and re-adding install_post hack.