diff options
author | wiz <wiz@pkgsrc.org> | 2004-12-17 22:29:06 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2004-12-17 22:29:06 +0000 |
commit | 7239f29672c8ec22ec578cc58ddbb2c35913dca4 (patch) | |
tree | 179330c25f54d17c0504df8e673bd6abe1a98d6d | |
parent | 920cb40dafe5cab682bae1ad1ebb3e23f7022887 (diff) | |
download | pkgsrc-7239f29672c8ec22ec578cc58ddbb2c35913dca4.tar.gz |
Apply patch from Debian package against CAN-2004-0996; based on patch
by Gerardo Di Giacomo. Bump PKGREVISION.
-rw-r--r-- | devel/cscope/Makefile | 4 | ||||
-rw-r--r-- | devel/cscope/distinfo | 3 | ||||
-rw-r--r-- | devel/cscope/patches/patch-af | 40 |
3 files changed, 44 insertions, 3 deletions
diff --git a/devel/cscope/Makefile b/devel/cscope/Makefile index 793b84bb4c7..2d71e0968cf 100644 --- a/devel/cscope/Makefile +++ b/devel/cscope/Makefile @@ -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 --git a/devel/cscope/distinfo b/devel/cscope/distinfo index aa959526c9e..cdb1d5acec9 100644 --- a/devel/cscope/distinfo +++ b/devel/cscope/distinfo @@ -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-ab) = 66042af02a5af64111a914aebcb4d7a74f421442 SHA1 (patch-ac) = 46fb2edc1ddec03c0ac50f87acde2b59f907e12b SHA1 (patch-ad) = b3975c7abfcbd2081fc63b9857b0f162400dc075 SHA1 (patch-ae) = b57c9bc91a88064dfa8dcb7592cd862eb926c7f1 +SHA1 (patch-af) = 7a2905d1d29b06b83684cbd7afdd8fc435cd8ef2 diff --git a/devel/cscope/patches/patch-af b/devel/cscope/patches/patch-af new file mode 100644 index 00000000000..8440af11c61 --- /dev/null +++ b/devel/cscope/patches/patch-af @@ -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) { |