[ctags] fix the crash in cssparse

Than Ngo than at fedoraproject.org
Thu Oct 18 20:08:20 UTC 2012


commit 6f8059b1a64a73e13f7b0ce2904b6bacbcab7c3e
Author: Than Ngo <than at redhat.com>
Date:   Thu Oct 18 22:08:04 2012 +0200

    fix the crash in cssparse

 ctags-5.8-cssparse.patch |   16 ++++++++++++++++
 ctags.spec               |    7 ++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/ctags-5.8-cssparse.patch b/ctags-5.8-cssparse.patch
new file mode 100644
index 0000000..f70c374
--- /dev/null
+++ b/ctags-5.8-cssparse.patch
@@ -0,0 +1,16 @@
+diff -up ctags-5.8/css.c.me ctags-5.8/css.c
+--- ctags-5.8/css.c.me	2012-10-18 22:03:20.126163700 +0200
++++ ctags-5.8/css.c	2012-10-18 22:04:03.237107358 +0200
+@@ -73,10 +73,11 @@ static CssParserState parseCssDeclaratio
+   {
+     if( (int) *cp == '\0' )
+     { 
++      /* assign position to the end of line. */
++      *position = cp;
+       cp = fileReadLine ();
+       if( cp == NULL ){
+         makeCssSimpleTag(name, kind, TRUE);
+-        *position = cp;
+         return P_STATE_AT_END;
+       }
+     }
diff --git a/ctags.spec b/ctags.spec
index 43827ff..5f6c0fa 100644
--- a/ctags.spec
+++ b/ctags.spec
@@ -1,7 +1,7 @@
 Summary: A C programming language indexing and/or cross-reference tool
 Name: ctags
 Version: 5.8
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv2+ or Public Domain
 Group: Development/Tools
 URL: http://ctags.sourceforge.net/
@@ -10,6 +10,7 @@ Patch0: ctags-5.7-destdir.patch
 Patch1: ctags-5.7-segment-fault.patch
 Patch2: ctags-5.8-css.patch
 Patch3: ctags-5.8-ocaml-crash.patch
+Patch4: ctags-5.8-cssparse.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -47,6 +48,7 @@ Note: some command line options is not compatible with GNU etags.
 %patch1 -p1 -b .crash
 %patch2 -p1 -b .css-support
 %patch3 -p1 -b .ocaml-crash
+%patch4 -p1 -b .cssparse-crash
 
 %build
 %configure
@@ -89,6 +91,9 @@ rm -rf %{buildroot}
 %{_mandir}/man1/etags.%{name}.1*
 
 %changelog
+* Thu Oct 18 2012 Than Ngo <than at redhat.com> - 5.8-8
+- fix the crash in cssparse
+
 * Thu Aug 02 2012 Than Ngo <than at redhat.com> - 5.8-7
 - backport from upstream to fix several crashes in ocaml
 


More information about the scm-commits mailing list