Fix empty function array in putpostingref()

Resolves: bz 1087940
This commit is contained in:
Neil Horman 2014-04-15 12:40:18 -04:00
parent 357f62888d
commit 4c1bfcad21
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -up ./src/find.c.orig ./src/find.c
--- ./src/find.c.orig 2014-04-15 12:17:44.412383314 -0400
+++ ./src/find.c 2014-04-15 12:19:17.122065215 -0400
@@ -1201,7 +1201,9 @@ getposting(void)
static void
putpostingref(POSTING *p, char *pat)
{
- static char function[PATLEN + 1]; /* function name */
+ // initialize function to "unknown" so that the first line of temp1
+ // is properly formed if symbol matches a header file entry first time
+ static char function[PATLEN + 1] = "unknown";/* function name */
if (p->fcnoffset == 0) {
if (p->type == FCNDEF) { /* need to find the function name */

View File

@ -1,7 +1,7 @@
Summary: C source code tree search and browse tool
Name: cscope
Version: 15.8
Release: 7%{?dist}
Release: 8%{?dist}
Source0: https://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.bz2
URL: http://cscope.sourceforge.net
License: BSD and GPLv2+
@ -18,6 +18,7 @@ Requires: emacs-filesystem xemacs-filesystem
Patch0: cscope-invindex-sizing.patch
Patch1: cscope-15.8-configure-in.patch
Patch2: cscope-15.8-empty-function-array.patch
%description
cscope is a mature, ncurses based, C source code tree browsing tool. It
@ -30,6 +31,8 @@ matches for use in file editing.
%setup -q
%patch0 -p0
%patch1 -p0
%patch2 -p0
autoreconf
%build
@ -87,6 +90,9 @@ rm -f %{emacs_lisp_path}/xcscope.el
rm -f %{vim_plugin_path}/cctree.vim
%changelog
* Tue Apr 15 2014 Neil Horman <nhorman@redhat.com> - 15.8-8
- Fixed formatting issue with empty function array (bz 1087940)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild