- apply patch to fix segment fault, thanks to Masatake YAMATO
This commit is contained in:
Than Ngo 2009-09-01 09:11:04 +00:00
parent 0025683873
commit 464f6335c4
4 changed files with 51 additions and 3 deletions

View File

@ -1,3 +1,4 @@
ctags-5.5.4.tar.gz
ctags-5.6.tar.gz
ctags-5.7.tar.gz
ctags-5.8.tar.gz

View File

@ -0,0 +1,41 @@
diff -ruN -x '*~' ctags-5.7/vim.c ctags-5.7/vim.c
--- ctags-5.7/vim.c 2006-10-26 12:06:21.000000000 +0900
+++ ctags-5.7/vim.c 2009-08-28 22:21:31.000000000 +0900
@@ -328,7 +328,7 @@
*/
const unsigned char *cp = line;
- if ( (int) *cp == '\\' )
+ if ( cp && ( (int) *cp == '\\' ) )
{
/*
* We are recursively calling this function is the command
@@ -350,9 +350,10 @@
while (*cp && isspace ((int) *cp))
++cp;
}
- else if ( (!strncmp ((const char*) line, "comp", (size_t) 4) == 0) &&
- (!strncmp ((const char*) line, "comc", (size_t) 4) == 0) &&
- (strncmp ((const char*) line, "com", (size_t) 3) == 0) )
+ else if ( line &&
+ (!strncmp ((const char*) line, "comp", (size_t) 4) == 0) &&
+ (!strncmp ((const char*) line, "comc", (size_t) 4) == 0) &&
+ (strncmp ((const char*) line, "com", (size_t) 3) == 0) )
{
cp += 2;
if ((int) *++cp == 'm' && (int) *++cp == 'a' &&
@@ -394,6 +395,14 @@
while (*cp && !isspace ((int) *cp))
++cp;
}
+ else if (!isalnum ((int) *cp))
+ {
+ /*
+ * Broken syntax: throw away this line
+ */
+ cmdProcessed = TRUE;
+ goto cleanUp;
+ }
} while ( *cp && !isalnum ((int) *cp) );
if ( ! *cp )

View File

@ -1,11 +1,12 @@
Summary: A C programming language indexing and/or cross-reference tool
Name: ctags
Version: 5.7
Release: 5%{?dist}
Version: 5.8
Release: 1%{?dist}
License: GPLv2+
Group: Development/Tools
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: ctags-5.7-destdir.patch
Patch1: ctags-5.7-segment-fault.patch
URL: http://ctags.sourceforge.net/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -41,6 +42,7 @@ Note: some command line options is not compatible with GNU etags.
%prep
%setup -q
%patch0 -p1 -b .destdir
%patch1 -p1 -b .crash
%build
%configure
@ -83,6 +85,10 @@ rm -rf %{buildroot}
%{_mandir}/man1/etags.%{name}.1*
%changelog
* Tue Sep 01 2009 Than Ngo <than@redhat.com> - 5.8-1
- 5.8
- apply patch to fix segment fault, thanks to Masatake YAMATO
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

View File

@ -1 +1 @@
643cab63b39c8a24377dc4c781547d40 ctags-5.7.tar.gz
c00f82ecdcc357434731913e5b48630d ctags-5.8.tar.gz