pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/cscope Apply patch from Debian package against C...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6e76d5910d75
branches:  trunk
changeset: 485627:6e76d5910d75
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Dec 17 22:29:06 2004 +0000

description:
Apply patch from Debian package against CAN-2004-0996; based on patch
by Gerardo Di Giacomo. Bump PKGREVISION.

diffstat:

 devel/cscope/Makefile         |   4 ++--
 devel/cscope/distinfo         |   3 ++-
 devel/cscope/patches/patch-af |  40 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 3 deletions(-)

diffs (72 lines):

diff -r 429dfc460f40 -r 6e76d5910d75 devel/cscope/Makefile
--- a/devel/cscope/Makefile     Fri Dec 17 22:09:51 2004 +0000
+++ b/devel/cscope/Makefile     Fri Dec 17 22:29:06 2004 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.35 2004/10/03 00:13:25 tv Exp $
+# $NetBSD: Makefile,v 1.36 2004/12/17 22:29:06 wiz Exp $
 #
 
 DISTNAME=      cscope-15.4
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=cscope/}
 
diff -r 429dfc460f40 -r 6e76d5910d75 devel/cscope/distinfo
--- a/devel/cscope/distinfo     Fri Dec 17 22:09:51 2004 +0000
+++ b/devel/cscope/distinfo     Fri Dec 17 22:29:06 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2004/05/05 13:25:27 wiz Exp $
+$NetBSD: distinfo,v 1.9 2004/12/17 22:29:06 wiz Exp $
 
 SHA1 (cscope-15.4.tar.gz) = 4b70bc0b3c87e5b3f032f9bd93af09ac861ca539
 Size (cscope-15.4.tar.gz) = 224057 bytes
@@ -7,3 +7,4 @@
 SHA1 (patch-ac) = 46fb2edc1ddec03c0ac50f87acde2b59f907e12b
 SHA1 (patch-ad) = b3975c7abfcbd2081fc63b9857b0f162400dc075
 SHA1 (patch-ae) = b57c9bc91a88064dfa8dcb7592cd862eb926c7f1
+SHA1 (patch-af) = 7a2905d1d29b06b83684cbd7afdd8fc435cd8ef2
diff -r 429dfc460f40 -r 6e76d5910d75 devel/cscope/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cscope/patches/patch-af     Fri Dec 17 22:29:06 2004 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-af,v 1.4 2004/12/17 22:29:06 wiz Exp $
+
+--- src/main.c.orig    2002-07-28 17:40:07.000000000 +0200
++++ src/main.c
+@@ -319,9 +319,32 @@ lastarg:
+       }
+ 
+       /* create the temporary file names */
+-      pid = getpid();
+-      (void) sprintf(temp1, "%s/cscope%d.1", tmpdir, pid);
+-      (void) sprintf(temp2, "%s/cscope%d.2", tmpdir, pid);
++      do {
++              char *tempfile = tempnam(tmpdir, "cscope1");
++              if (!tempfile) {
++                      fprintf (stderr, "Can't create tempfile\n");
++                      exit(1);
++              }
++              if (strlen(tempfile) >= sizeof(temp1)) {
++                      fprintf (stderr, "TMPDIR path is too long\n");
++                      exit(1);
++              }
++              strncpy (temp1, tempfile, sizeof (temp1));
++              free (tempfile);
++      } while (open (temp1, O_CREAT|O_EXCL|O_WRONLY, S_IREAD|S_IWRITE) < 0);
++      do {
++              char *tempfile = tempnam(tmpdir, "cscope2");
++              if (!tempfile) {
++                      fprintf (stderr, "Can't create tempfile\n");
++                      exit(1);
++              }
++              if (strlen(tempfile) >= sizeof(temp2)) {
++                      fprintf (stderr, "TMPDIR path is too long\n");
++                      exit(1);
++              }
++              strncpy (temp2, tempfile, sizeof (temp2));
++              free (tempfile);
++      } while (open (temp2, O_CREAT|O_EXCL|O_WRONLY, S_IREAD|S_IWRITE) < 0);
+ 
+       /* if running in the foreground */
+       if (signal(SIGINT, SIG_IGN) != SIG_IGN) {



Home | Main Index | Thread Index | Old Index