aboutsummaryrefslogtreecommitdiff
path: root/devel/cscope
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2006-10-05 22:23:33 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2006-10-05 22:23:33 +0000
commit8a4b4ae9e46042c7404f4430377f02ee7ca479d8 (patch)
treea92d08d95028662fcda0999cae72a41f38e208eb /devel/cscope
parent1e797b46c4a051e79f393bffe96b5df1fa2c299b (diff)
Notes
Diffstat (limited to 'devel/cscope')
-rw-r--r--devel/cscope/Makefile4
-rw-r--r--devel/cscope/distinfo6
-rw-r--r--devel/cscope/files/patch-CVE-2004-2541262
-rw-r--r--devel/cscope/files/patch-aa11
-rw-r--r--devel/cscope/files/patch-ab28
-rw-r--r--devel/cscope/files/patch-main.c27
-rw-r--r--devel/cscope/files/patch-src::main.c52
7 files changed, 32 insertions, 358 deletions
diff --git a/devel/cscope/Makefile b/devel/cscope/Makefile
index 8cb13105c119..db054ce4b158 100644
--- a/devel/cscope/Makefile
+++ b/devel/cscope/Makefile
@@ -7,8 +7,8 @@
#
PORTNAME= cscope
-PORTVERSION= 15.5
-PORTREVISION= 2
+PORTVERSION= 15.6
+PORTREVISION= 0
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/devel/cscope/distinfo b/devel/cscope/distinfo
index c5d6820d5a2b..3adba8ae4917 100644
--- a/devel/cscope/distinfo
+++ b/devel/cscope/distinfo
@@ -1,3 +1,3 @@
-MD5 (cscope-15.5.tar.gz) = beb6032a301bb11524aec74bfb5e4840
-SHA256 (cscope-15.5.tar.gz) = be49cda0a9d33add89cabe0dfcef436a2863a7b0b833767875e0b7a6e8b4c4d1
-SIZE (cscope-15.5.tar.gz) = 243793
+MD5 (cscope-15.6.tar.gz) = db87833f90d8267b1fc0c419cfc4d219
+SHA256 (cscope-15.6.tar.gz) = 6d6461ef402a1d6e42e1cd40e7524c4ed19e79eacef1d83ba4ed680f7bcac5ca
+SIZE (cscope-15.6.tar.gz) = 391223
diff --git a/devel/cscope/files/patch-CVE-2004-2541 b/devel/cscope/files/patch-CVE-2004-2541
deleted file mode 100644
index 76adf3001121..000000000000
--- a/devel/cscope/files/patch-CVE-2004-2541
+++ /dev/null
@@ -1,262 +0,0 @@
---- src/build.c
-+++ src/build.c
-@@ -215,7 +215,7 @@
- (void) strcpy(newdir, "$HOME");
- }
- else if (strncmp(currentdir, home, strlen(home)) == 0) {
-- (void) sprintf(newdir, "$HOME%s", currentdir + strlen(home));
-+ (void) snprintf(newdir, sizeof(newdir), "$HOME%s", currentdir + strlen(home));
- }
- /* sort the source file names (needed for rebuilding) */
- qsort(srcfiles, (unsigned) nsrcfiles, sizeof(char *), compare);
-@@ -443,7 +443,7 @@
- }
- (void) fstat(fileno(postings), &statstruct);
- (void) fclose(postings);
-- (void) sprintf(sortcommand, "env LC_ALL=C sort -T %s %s", tmpdir, temp1);
-+ (void) snprintf(sortcommand, sizeof(sortcommand), "env LC_ALL=C sort -T %s %s", tmpdir, temp1);
- if ((postings = mypopen(sortcommand, "r")) == NULL) {
- (void) fprintf(stderr, "cscope: cannot open pipe to sort command\n");
- cannotindex();
---- src/command.c
-+++ src/command.c
-@@ -718,7 +718,7 @@
-
- /* make sure it can be changed */
- if (access(newfile, WRITE) != 0) {
-- (void) sprintf(msg, "Cannot write to file %s", newfile);
-+ (void) snprintf(msg, sizeof(msg), "Cannot write to file %s", newfile);
- postmsg(msg);
- anymarked = NO;
- break;
---- src/dir.c
-+++ src/dir.c
-@@ -138,7 +138,7 @@
-
- /* compute its path from higher view path source dirs */
- for (i = 1; i < nvpsrcdirs; ++i) {
-- (void) sprintf(path, "%.*s/%s",
-+ (void) snprintf(path, sizeof(path), "%.*s/%s",
- PATHLEN - 2 - dir_len,
- srcdirs[i], dir);
- addsrcdir(path);
-@@ -206,7 +206,7 @@
-
- /* compute its path from higher view path source dirs */
- for (i = 1; i < nvpsrcdirs; ++i) {
-- (void) sprintf(path, "%.*s/%s",
-+ (void) snprintf(path, sizeof(path), "%.*s/%s",
- PATHLEN - 2 - dir_len,
- srcdirs[i], dir);
- addincdir(dir, path);
-@@ -474,8 +474,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];
-@@ -486,7 +484,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);
-
-@@ -603,14 +601,14 @@
- for (i = 0; i < nincdirs; ++i) {
-
- /* don't include the file from two directories */
-- (void) sprintf(name, "%.*s/%s",
-+ (void) 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 */
-- (void) sprintf(path, "%.*s/%s",
-+ (void) snprintf(path, sizeof(path), "%.*s/%s",
- PATHLEN - 2 - file_len, incdirs[i],
- file);
- if (access(compath(path), READ) == 0) {
-@@ -654,7 +652,7 @@
-
- /* compute its path from higher view path source dirs */
- for (i = 1; i < nvpsrcdirs; ++i) {
-- (void) sprintf(path, "%.*s/%s",
-+ (void) 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
-@@ -473,24 +473,24 @@
- /* 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);
-@@ -555,17 +555,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;
-@@ -603,7 +603,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
-@@ -124,7 +124,7 @@
-
- /* execute the program or shell script */
- (void) execvp(a, args); /* returns only on failure */
-- (void) sprintf(msg, "\nCannot exec %s", a);
-+ (void) 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
-@@ -666,7 +666,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
-@@ -352,12 +374,12 @@
- * used instead of failing to open a non-existant database in
- * the home directory
- */
-- (void) sprintf(path, "%s/%s", home, reffile);
-+ (void) snprintf(path, sizeof(path), "%s/%s", home, reffile);
- if (isuptodate == NO || access(path, READ) == 0) {
- reffile = stralloc(path);
-- (void) sprintf(path, "%s/%s", home, invname);
-+ (void) snprintf(path, sizeof(path), "%s/%s", home, invname);
- invname = stralloc(path);
-- (void) sprintf(path, "%s/%s", home, invpost);
-+ (void) snprintf(path, sizeof(path), "%s/%s", home, invpost);
- invpost = stralloc(path);
- }
- }
-@@ -692,7 +714,7 @@
- #else
- char *msg = mymalloc(50+strlen(file));
-
-- (void) sprintf(msg, "Removed file %s because write failed", file);
-+ (void) 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;
- }
diff --git a/devel/cscope/files/patch-aa b/devel/cscope/files/patch-aa
deleted file mode 100644
index ad0f8789c9ad..000000000000
--- a/devel/cscope/files/patch-aa
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/constants.h.orig Sun Jul 28 09:22:38 2002
-+++ src/constants.h Mon Aug 5 12:07:50 2002
-@@ -95,7 +95,7 @@
- #define INCLUDES 8
- #define FIELDS 9
-
--#if (BSD || V9) && !__NetBSD__
-+#if (BSD || V9) && !__NetBSD__ && !__FreeBSD__
- #define TERMINFO 0 /* no terminfo curses */
- #else
- #define TERMINFO 1
diff --git a/devel/cscope/files/patch-ab b/devel/cscope/files/patch-ab
deleted file mode 100644
index b0c3187bc12e..000000000000
--- a/devel/cscope/files/patch-ab
+++ /dev/null
@@ -1,28 +0,0 @@
---- src/egrep.y.old Sun Aug 15 21:07:51 2004
-+++ src/egrep.y Sun Aug 15 21:09:26 2004
-@@ -603,25 +603,6 @@
- return(0);
- }
-
--/* FIXME HBB: should export this to a separate file and use
-- * AC_REPLACE_FUNCS() */
--#if BSD
--/*LINTLIBRARY*/
--/*
-- * Set an array of n chars starting at sp to the character c.
-- * Return sp.
-- */
--char *
--memset(char *sp, char c, int n)
--{
-- char *sp0 = sp;
--
-- while (--n >= 0)
-- *sp++ = c;
-- return (sp0);
--}
--#endif
--
- void
- egrepcaseless(int i)
- {
diff --git a/devel/cscope/files/patch-main.c b/devel/cscope/files/patch-main.c
new file mode 100644
index 000000000000..96863c2328cd
--- /dev/null
+++ b/devel/cscope/files/patch-main.c
@@ -0,0 +1,27 @@
+--- src/main.c.orig Sat Sep 30 01:13:00 2006
++++ src/main.c Thu Oct 5 15:21:30 2006
+@@ -359,7 +359,7 @@ cscope: TMPDIR to a valid directory\n");
+ /* create the temporary file names */
+ orig_umask = umask(S_IRWXG|S_IRWXO);
+ pid = getpid();
+- sprintf(tempdirpv, "%s/cscope.%d", tmpdir, pid);
++ snprintf(tempdirpv, sizeof(tempdirpv), "%s/cscope.%d", tmpdir, pid);
+ if(mkdir(tempdirpv,S_IRWXU)) {
+ fprintf(stderr, "\
+ cscope: Could not create private temp dir %s\n",
+@@ -368,8 +368,13 @@ cscope: Could not create private temp di
+ }
+ umask(orig_umask);
+
+- sprintf(temp1, "%s/cscope.1", tempdirpv);
+- sprintf(temp2, "%s/cscope.2", tempdirpv);
++ if ((strlen(tempdirpv) + strlen("/cscope.X")) > PATHLEN) {
++ fprintf(stderr, "cscope: Could not create private temp files\n");
++ myexit(1);
++ }
++
++ snprintf(temp1, sizeof(temp1), "%s/cscope.1", tempdirpv);
++ snprintf(temp2, sizeof(temp2), "%s/cscope.2", tempdirpv);
+
+ /* if running in the foreground */
+ if (signal(SIGINT, SIG_IGN) != SIG_IGN) {
diff --git a/devel/cscope/files/patch-src::main.c b/devel/cscope/files/patch-src::main.c
deleted file mode 100644
index 169d81e5207e..000000000000
--- a/devel/cscope/files/patch-src::main.c
+++ /dev/null
@@ -1,52 +0,0 @@
---- src/main.c.orig Thu Aug 14 11:36:18 2003
-+++ src/main.c Tue May 23 11:56:09 2006
-@@ -101,6 +101,7 @@
- #endif
- char temp1[PATHLEN + 1]; /* temporary file name */
- char temp2[PATHLEN + 1]; /* temporary file name */
-+char tempdirpv[PATHLEN +1]; /* private temp directory */
- long totalterms; /* total inverted index terms */
- BOOL trun_syms; /* truncate symbols to 8 characters */
- char tempstring[8192]; /* use this as a buffer, instead of 'yytext',
-@@ -131,6 +132,7 @@
- int c, i;
- pid_t pid;
- struct stat stat_buf;
-+ mode_t orig_umask;
-
- yyin = stdin;
- yyout = stdout;
-@@ -330,9 +332,23 @@
- }
-
- /* create the temporary file names */
-+ orig_umask = umask(S_IRWXG|S_IRWXO);
- pid = getpid();
-- (void) sprintf(temp1, "%s/cscope%d.1", tmpdir, pid);
-- (void) sprintf(temp2, "%s/cscope%d.2", tmpdir, pid);
-+ (void) snprintf(tempdirpv, sizeof(tempdirpv), "%s/cscope.%d", tmpdir, pid);
-+ if(mkdir(tempdirpv,S_IRWXU))
-+ {
-+ fprintf(stderr, "cscope: Could not create private temp dir %s\n",tempdirpv);
-+ myexit(1);
-+ }
-+ umask(orig_umask);
-+
-+ if ((strlen(tempdirpv) + strlen("/cscope.X")) > PATHLEN) {
-+ fprintf(stderr, "cscope: Could not create private temp files\n");
-+ myexit(1);
-+ }
-+
-+ (void) snprintf(temp1, sizeof(temp1), "%s/cscope.1", tempdirpv);
-+ (void) snprintf(temp2, sizeof(temp2), "%s/cscope.2", tempdirpv);
-
- /* if running in the foreground */
- if (signal(SIGINT, SIG_IGN) != SIG_IGN) {
-@@ -834,6 +850,7 @@
- if (temp1[0] != '\0') {
- (void) unlink(temp1);
- (void) unlink(temp2);
-+ (void) rmdir(tempdirpv);
- }
- /* restore the terminal to its original mode */
- if (incurses == YES) {