diff options
Diffstat (limited to 'devel/cscope/patches/patch-ae')
-rw-r--r-- | devel/cscope/patches/patch-ae | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/devel/cscope/patches/patch-ae b/devel/cscope/patches/patch-ae new file mode 100644 index 00000000000..80ecdd65bdd --- /dev/null +++ b/devel/cscope/patches/patch-ae @@ -0,0 +1,20 @@ +--- src/build.c.orig 2003-03-05 10:43:59.000000000 +0000 ++++ src/build.c 2006-05-29 14:34:26.000000000 +0100 +@@ -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(); |