diff options
author | Jakub Bogusz | 2006-10-04 20:01:39 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | aaca1d1ff91f7a15f37a240a80c6b7532383afde (patch) | |
tree | ae83c4a17e6e20119b03f97de279a1a24581abdf | |
parent | 3bc27761c21733f2925b32eaf83f3a168c31fbe2 (diff) | |
download | cscope-aaca1d1ff91f7a15f37a240a80c6b7532383afde.zip cscope-aaca1d1ff91f7a15f37a240a80c6b7532383afde.tar.gz |
- obsolete
Changed files:
cscope-CAN-2004-0996.patch -> 1.2
-rw-r--r-- | cscope-CAN-2004-0996.patch | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/cscope-CAN-2004-0996.patch b/cscope-CAN-2004-0996.patch deleted file mode 100644 index 4084b13..0000000 --- a/cscope-CAN-2004-0996.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- cscope-15.3.orig/src/main.c -+++ cscope-15.3/src/main.c -@@ -336,9 +336,32 @@ - } - - /* 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) { |