OBS User unknown 2007-01-15 23:08:09 +00:00 committed by Git OBS Bridge
commit f3ae6d8a6e
10 changed files with 564 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,11 @@
--- src/global.h
+++ src/global.h
@@ -360,7 +360,7 @@
void mousemenu(void);
void mouseinit(void);
void mousereinit(void);
-void myexit(int sig);
+void myexit(int sig) __attribute__ ((noreturn));
void myperror(char *text);
void ogsnames(char *file, char **subsystem, char **book);
void progress(char *what, long current, long max);

258
cscope-15.6-sprintf.patch Normal file
View File

@ -0,0 +1,258 @@
--- src/build.c
+++ src/build.c
@@ -223,7 +223,7 @@
if (strcmp(currentdir, home) == 0) {
strcpy(newdir, "$HOME");
} else if (strncmp(currentdir, home, strlen(home)) == 0) {
- sprintf(newdir, "$HOME%s", currentdir + strlen(home));
+ snprintf(newdir, sizeof(newdir), "$HOME%s", currentdir + strlen(home));
}
/* sort the source file names (needed for rebuilding) */
qsort(srcfiles, nsrcfiles, sizeof(char *), compare);
@@ -454,7 +454,7 @@
}
fstat(fileno(postings), &statstruct);
fclose(postings);
- sprintf(sortcommand, "env LC_ALL=C sort -T %s %s", tmpdir, temp1);
+ snprintf(sortcommand, sizeof(sortcommand), "env LC_ALL=C sort -T %s %s", tmpdir, temp1);
if ((postings = mypopen(sortcommand, "r")) == NULL) {
fprintf(stderr, "cscope: cannot open pipe to sort command\n");
cannotindex();
--- src/command.c
+++ src/command.c
@@ -739,7 +739,7 @@
/* make sure it can be changed */
if (access(newfile, WRITE) != 0) {
- sprintf(msg, "Cannot write to file %s", newfile);
+ snprintf(msg, sizeof(msg), "Cannot write to file %s", newfile);
postmsg(msg);
anymarked = NO;
break;
--- src/dir.c
+++ src/dir.c
@@ -139,7 +139,7 @@
/* compute its path from higher view path source dirs */
for (i = 1; i < nvpsrcdirs; ++i) {
- sprintf(path, "%.*s/%s",
+ snprintf(path, sizeof(path), "%.*s/%s",
PATHLEN - 2 - dir_len,
srcdirs[i], dir);
addsrcdir(path);
@@ -207,7 +207,7 @@
/* compute its path from higher view path source dirs */
for (i = 1; i < nvpsrcdirs; ++i) {
- sprintf(path, "%.*s/%s",
+ snprintf(path, sizeof(path), "%.*s/%s",
PATHLEN - 2 - dir_len,
srcdirs[i], dir);
addincdir(dir, path);
@@ -482,8 +482,6 @@
DIR *dirfile;
int adir_len = strlen(adir);
- /* FIXME: no guards against adir_len > PATHLEN, yet */
-
if ((dirfile = opendir(adir)) != NULL) {
struct dirent *entry;
char path[PATHLEN + 1];
@@ -494,7 +492,7 @@
&& (strcmp("..",entry->d_name) != 0)) {
struct stat buf;
- sprintf(path,"%s/%.*s", adir,
+ snprintf(path, sizeof(path), "%s/%.*s", adir,
PATHLEN - 2 - adir_len,
entry->d_name);
@@ -604,14 +602,14 @@
/* search for the file in the #include directory list */
for (i = 0; i < nincdirs; ++i) {
/* don't include the file from two directories */
- sprintf(name, "%.*s/%s",
+ snprintf(name, sizeof(name), "%.*s/%s",
PATHLEN - 2 - file_len, incnames[i],
file);
if (infilelist(name) == YES) {
break;
}
/* make sure it exists and is readable */
- sprintf(path, "%.*s/%s",
+ snprintf(path, sizeof(path), "%.*s/%s",
PATHLEN - 2 - file_len, incdirs[i],
file);
if (access(compath(path), READ) == 0) {
@@ -659,7 +657,7 @@
/* compute its path from higher view path source dirs */
for (i = 1; i < nvpsrcdirs; ++i) {
- sprintf(path, "%.*s/%s",
+ snprintf(path, sizeof(path), "%.*s/%s",
PATHLEN - 2 - file_len, srcdirs[i],
file);
if (access(compath(path), READ) == 0) {
--- src/display.c
+++ src/display.c
@@ -478,20 +478,20 @@
/* see if it is empty */
if ((c = getc(refsfound)) == EOF) {
if (findresult != NULL) {
- (void) sprintf(lastmsg, "Egrep %s in this pattern: %s",
+ (void) snprintf(lastmsg, sizeof(lastmsg), "Egrep %s in this pattern: %s",
findresult, Pattern);
} else if (rc == NOTSYMBOL) {
- (void) sprintf(lastmsg, "This is not a C symbol: %s",
+ (void) snprintf(lastmsg, sizeof(lastmsg), "This is not a C symbol: %s",
Pattern);
} else if (rc == REGCMPERROR) {
- (void) sprintf(lastmsg, "Error in this regcomp(3) regular expression: %s",
+ (void) snprintf(lastmsg, sizeof(lastmsg), "Error in this regcomp(3) regular expression: %s",
Pattern);
} else if (funcexist == NO) {
- (void) sprintf(lastmsg, "Function definition does not exist: %s",
+ (void) snprintf(lastmsg, sizeof(lastmsg), "Function definition does not exist: %s",
Pattern);
} else {
- (void) sprintf(lastmsg, "Could not find the %s: %s",
+ (void) snprintf(lastmsg, sizeof(lastmsg), "Could not find the %s: %s",
fields[field].text2, Pattern);
}
return(NO);
@@ -527,17 +527,17 @@
move(MSGLINE, 0);
clrtoeol();
addstr(what);
- sprintf(msg, "%ld", current);
+ snprintf(msg, sizeof(msg), "%ld", current);
move(MSGLINE, (COLS / 2) - (strlen(msg) / 2));
addstr(msg);
- sprintf(msg, "%ld", max);
+ snprintf(msg, sizeof(msg), "%ld", max);
move(MSGLINE, COLS - strlen(msg));
addstr(msg);
refresh();
}
else if (verbosemode == YES)
{
- sprintf(msg, "> %s %ld of %ld", what, current, max);
+ snprintf(msg, sizeof(msg), "> %s %ld of %ld", what, current, max);
}
start = now;
@@ -575,7 +575,7 @@
s = sys_errlist[errno];
}
#endif
- (void) sprintf(msg, "%s: %s", text, s);
+ (void) snprintf(msg, sizeof(msg), "%s: %s", text, s);
postmsg(msg);
}
--- src/edit.c
+++ src/edit.c
@@ -105,9 +105,9 @@
char *s;
file = filepath(file);
- (void) sprintf(msg, "%s +%s %s", mybasename(editor), linenum, file);
+ (void) snprintf(msg, sizeof(msg), "%s +%s %s", mybasename(editor), linenum, file);
postmsg(msg);
- (void) sprintf(plusnum, lineflag, linenum);
+ (void) snprintf(plusnum, sizeof(plusnum), lineflag, linenum);
/* if this is the more or page commands */
if (strcmp(s = mybasename(editor), "more") == 0 || strcmp(s, "page") == 0) {
@@ -132,7 +132,7 @@
static char path[PATHLEN + 1];
if (prependpath != NULL && *file != '/') {
- (void) sprintf(path, "%s/%s", prependpath, file);
+ (void) snprintf(path, sizeof(path), "%s/%s", prependpath, file);
file = path;
}
return(file);
--- src/exec.c
+++ src/exec.c
@@ -123,7 +123,7 @@
/* execute the program or shell script */
execvp(a, args); /* returns only on failure */
- sprintf(msg, "\nCannot exec %s", a);
+ snprintf(msg, sizeof(msg), "\nCannot exec %s", a);
perror(msg); /* display the reason */
askforreturn(); /* wait until the user sees the message */
myexit(1); /* exit the child */
--- src/find.c
+++ src/find.c
@@ -673,7 +673,7 @@
/* must be an exact match */
/* note: regcomp doesn't recognize ^*keypad$ as a syntax error
unless it is given as a single arg */
- (void) sprintf(buf, "^%s$", s);
+ (void) snprintf(buf, sizeof(buf), "^%s$", s);
if (regcomp (&regexp, buf, REG_EXTENDED | REG_NOSUB) != 0) {
return(REGCMPERROR);
}
--- src/main.c
+++ src/main.c
@@ -389,12 +389,12 @@
* used instead of failing to open a non-existant database in
* the home directory
*/
- sprintf(path, "%s/%s", home, reffile);
+ snprintf(path, sizeof(path), "%s/%s", home, reffile);
if (isuptodate == NO || access(path, READ) == 0) {
reffile = my_strdup(path);
- sprintf(path, "%s/%s", home, invname);
+ snprintf(path, sizeof(path), "%s/%s", home, invname);
invname = my_strdup(path);
- sprintf(path, "%s/%s", home, invpost);
+ snprintf(path, sizeof(path), "%s/%s", home, invpost);
invpost = my_strdup(path);
}
}
@@ -735,7 +735,7 @@
#else
char *msg = mymalloc(50 + strlen(file));
- sprintf(msg, "Removed file %s because write failed", file);
+ snprintf(msg, sizeof(msg), "Removed file %s because write failed", file);
#endif
myperror(msg); /* display the reason */
--- src/vpaccess.c
+++ src/vpaccess.c
@@ -49,7 +49,7 @@
if ((returncode = access(path, amode)) == -1 && path[0] != '/') {
vpinit(NULL);
for (i = 1; i < vpndirs; i++) {
- (void) sprintf(buf, "%s/%s", vpdirs[i], path);
+ (void) snprintf(buf, sizeof(buf), "%s/%s", vpdirs[i], path);
if ((returncode = access(buf, amode)) != -1) {
break;
}
--- src/vpfopen.c
+++ src/vpfopen.c
@@ -53,7 +53,7 @@
) {
vpinit(NULL);
for (i = 1; i < vpndirs; i++) {
- (void) sprintf(buf, "%s/%s", vpdirs[i], filename);
+ (void) snprintf(buf, sizeof(buf), "%s/%s", vpdirs[i], filename);
if ((returncode = myfopen(buf, type)) != NULL) {
break;
}
--- src/vpopen.c
+++ src/vpopen.c
@@ -52,7 +52,7 @@
oflag == OPENFLAG_READ) {
vpinit(NULL);
for (i = 1; i < vpndirs; i++) {
- (void) sprintf(buf, "%s/%s", vpdirs[i], path);
+ (void) snprintf(buf, sizeof(buf), "%s/%s", vpdirs[i], path);
if ((returncode = myopen(buf, oflag, 0666)) != -1) {
break;
}

34
cscope-15.6-vpath.patch Normal file
View File

@ -0,0 +1,34 @@
--- src/vpinit.c
+++ src/vpinit.c
@@ -110,7 +110,13 @@
vpath = stralloc(vpath);
/* split the view path into nodes */
- for (i = 0, s = vpath; *s != '\0'; ++i) {
+ /* handle VPATH=":foo" */
+ i = 0;
+ s = vpath;
+ while (*s++ == ':') {
+ vpdirs[i++] = ".";
+ }
+ for (; *s != '\0'; ++i) {
vpdirs[i] = s;
while (*s != '\0' && *++s != ':') {
if (*s == '\n') {
@@ -118,6 +124,16 @@
}
}
if (*s != '\0') {
+ /* handle VPATH="foo:" and VPATH="foo::bar" */
+ if (s[1] == '\0' || s[1] == ':') {
+ while (s[1] != '\0' && s[1] == ':') {
+ vpdirs[++i] = ".";
+ *s++ = '\0';
+ }
+ if (s[1] == '\0') {
+ vpdirs[++i] = ".";
+ }
+ }
*s++ = '\0';
}
}

3
cscope-15.6.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:104b2beb4ee60b839fe04f50d94a39932b628159ea66929bba8594814e28604f
size 332675

11
cscope-null.patch Normal file
View File

@ -0,0 +1,11 @@
--- cscope-15.6/src/mypopen.c
+++ cscope-15.6/src/mypopen.c
@@ -160,7 +160,7 @@
fcntl(yourside, F_DUPFD, stdio);
#endif
close(yourside);
- execlp(shell, mybasename(shell), "-c", cmd, (void *)0);
+ execlp(shell, mybasename(shell), "-c", cmd, NULL);
_exit(1);
} else if (pid > 0)
tstat = signal(SIGTSTP, SIG_DFL);

104
cscope.changes Normal file
View File

@ -0,0 +1,104 @@
-------------------------------------------------------------------
Fri Nov 10 12:22:47 CET 2006 - ro@suse.de
- fix manpage permissions
-------------------------------------------------------------------
Wed Oct 18 18:33:22 CEST 2006 - anosek@suse.cz
- updated to version 15.6
* fixed various security issues
- dropped obsolete CVE-2006-4262.patch, tmpfile.patch
-------------------------------------------------------------------
Wed Aug 30 09:55:04 CEST 2006 - anosek@suse.cz
- fixed previous change
-------------------------------------------------------------------
Tue Aug 29 16:53:48 CEST 2006 - anosek@suse.de
- fixed multiple buffer overflows [#200534] (CVE-2006-4262.pach)
-------------------------------------------------------------------
Mon May 29 17:19:05 CEST 2006 - mmarek@suse.cz
- replace sprintf() with snprintf() (patch taken from debian
package) to avoid buffer overflows such as CVE-2004-2541
[#177568] (sprintf.patch)
-------------------------------------------------------------------
Mon Feb 27 10:35:04 CET 2006 - mmarek@suse.cz
- fix handling of empty VPATH components
[#152643] (vpath.patch)
-------------------------------------------------------------------
Wed Jan 25 21:35:14 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Sep 19 12:36:15 CEST 2005 - mmarek@suse.cz
- fix "control reaches end of non-void function" warning in exec.c
-------------------------------------------------------------------
Sat Jan 29 17:26:28 CET 2005 - meissner@suse.de
- use NULL as execlp arglist terminator.
-------------------------------------------------------------------
Mon Nov 29 13:52:11 CET 2004 - ltinkl@suse.cz
- fix insecure temp file handling vulnerability (#48541)
-------------------------------------------------------------------
Sat Jan 10 20:07:11 CET 2004 - adrian@suse.de
- build as user
-------------------------------------------------------------------
Tue Sep 30 11:50:14 CEST 2003 - ltinkl@suse.cz
- updated to 15.5
- dropped obsolete patch
-------------------------------------------------------------------
Mon Jan 20 16:23:46 CET 2003 - vbobek@suse.cz
- updated to version 15.4 (bugfixes only)
- used $RPM_OPT_FLAGS
-------------------------------------------------------------------
Tue Dec 17 16:26:00 CET 2002 - sf@suse.de
- added suse_update_config (bug #22296)
-------------------------------------------------------------------
Thu Nov 07 10:51:16 CET 2002 - tcrhak@suse.cz
- fixed egrep.y for bison 1.75:
use `{ action }' instead of `={ action }'
-------------------------------------------------------------------
Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de
- removed bogus self-provides
-------------------------------------------------------------------
Fri Aug 10 14:44:30 CEST 2001 - pmladek@suse.cz
- updated to version 15.3
- bzipped sources
-------------------------------------------------------------------
Thu Mar 22 12:47:42 CET 2001 - pblaha@suse.cz
- add URL
-------------------------------------------------------------------
Fri Dec 1 14:29:34 MET 2000 - uzi@suse.com
- Initial package based on version 15.1

119
cscope.spec Normal file
View File

@ -0,0 +1,119 @@
#
# spec file for package cscope (Version 15.6)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: cscope
License: BSD License and BSD-like
Group: Development/Tools/Navigators
Autoreqprov: on
Version: 15.6
Release: 8
Summary: Interactive Tool for Browsing C Source Code
Source: cscope-%{version}.tar.bz2
Patch1: cscope-null.patch
Patch2: cscope-%{version}-gcc-warnings.patch
Patch3: cscope-%{version}-vpath.patch
Patch4: cscope-%{version}-sprintf.patch
URL: http://cscope.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define _prefix /usr
%description
Cscope is an interactive, screen-oriented tool that allows the user to
browse through C source code files for specified elements of code.
Authors:
--------
Petr Sorfa <petr@users.sourceforge.net>
Mike Hopkirk <hops@sco.com>
Darrylo Okahata <darrylo@users.sourceforge.net>
Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
Joshua Uziel <uzi@suse.com>
%prep
%setup -q
%patch1 -p1
%patch2
%patch3
%patch4
%build
%{?suse_update_config:%{suse_update_config}}
CFLAGS="$RPM_OPT_FLAGS" \
./configure
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 755 src/cscope $RPM_BUILD_ROOT%{_prefix}/bin/cscope
install -m 644 doc/cscope.1 $RPM_BUILD_ROOT%{_mandir}/man1/cscope.1
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc TODO COPYING ChangeLog AUTHORS README NEWS INSTALL
%doc %{_mandir}/man1/cscope.1.gz
%{_prefix}/bin/cscope
%changelog -n cscope
* Fri Nov 10 2006 - ro@suse.de
- fix manpage permissions
* Wed Oct 18 2006 - anosek@suse.cz
- updated to version 15.6
* fixed various security issues
- dropped obsolete CVE-2006-4262.patch, tmpfile.patch
* Wed Aug 30 2006 - anosek@suse.cz
- fixed previous change
* Tue Aug 29 2006 - anosek@suse.de
- fixed multiple buffer overflows [#200534] (CVE-2006-4262.pach)
* Mon May 29 2006 - mmarek@suse.cz
- replace sprintf() with snprintf() (patch taken from debian
package) to avoid buffer overflows such as CVE-2004-2541
[#177568] (sprintf.patch)
* Mon Feb 27 2006 - mmarek@suse.cz
- fix handling of empty VPATH components
[#152643] (vpath.patch)
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Sep 19 2005 - mmarek@suse.cz
- fix "control reaches end of non-void function" warning in exec.c
* Sat Jan 29 2005 - meissner@suse.de
- use NULL as execlp arglist terminator.
* Mon Nov 29 2004 - ltinkl@suse.cz
- fix insecure temp file handling vulnerability (#48541)
* Sat Jan 10 2004 - adrian@suse.de
- build as user
* Tue Sep 30 2003 - ltinkl@suse.cz
- updated to 15.5
- dropped obsolete patch
* Mon Jan 20 2003 - vbobek@suse.cz
- updated to version 15.4 (bugfixes only)
- used $RPM_OPT_FLAGS
* Tue Dec 17 2002 - sf@suse.de
- added suse_update_config (bug #22296)
* Thu Nov 07 2002 - tcrhak@suse.cz
- fixed egrep.y for bison 1.75:
use `{ action }' instead of `={ action }'
* Tue Sep 17 2002 - ro@suse.de
- removed bogus self-provides
* Fri Aug 10 2001 - pmladek@suse.cz
- updated to version 15.3
- bzipped sources
* Thu Mar 22 2001 - pblaha@suse.cz
- add URL
* Fri Dec 01 2000 - uzi@suse.com
- Initial package based on version 15.1

0
ready Normal file
View File