diff options
author | joda <joda> | 2001-09-19 08:57:06 +0000 |
---|---|---|
committer | joda <joda> | 2001-09-19 08:57:06 +0000 |
commit | 4da7af9c87e4906598aa46d71a1d88ae358c99fb (patch) | |
tree | 6ebb720ff4fc14f72ed91d72013f1c9f307f4679 /devel | |
parent | a667a3eb93854ef7371782e80675553cbc335952 (diff) | |
download | pkgsrc-4da7af9c87e4906598aa46d71a1d88ae358c99fb.tar.gz |
remove unnecessary alloca's; quash one buffer overrun
Diffstat (limited to 'devel')
-rw-r--r-- | devel/id-utils/distinfo | 5 | ||||
-rw-r--r-- | devel/id-utils/patches/patch-ai | 39 | ||||
-rw-r--r-- | devel/id-utils/patches/patch-aj | 21 | ||||
-rw-r--r-- | devel/id-utils/patches/patch-ak | 30 |
4 files changed, 94 insertions, 1 deletions
diff --git a/devel/id-utils/distinfo b/devel/id-utils/distinfo index c9ac8873cb2..ae12fe8ba2b 100644 --- a/devel/id-utils/distinfo +++ b/devel/id-utils/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2001/08/04 09:52:27 wiz Exp $ +$NetBSD: distinfo,v 1.4 2001/09/19 08:57:06 joda Exp $ SHA1 (id-utils-3.2.tar.gz) = 14d96a2170745883d077fa8c436e4380f28951a5 Size (id-utils-3.2.tar.gz) = 388012 bytes @@ -10,3 +10,6 @@ SHA1 (patch-ae) = 58fa58e328fd658ee9c4d1dc88e9a23da8ddea8e SHA1 (patch-af) = 5bd90d47e2991667b96e29a5883a8aa809eb33a7 SHA1 (patch-ag) = 85312aeb8c39f653205d51e881d4533a542657ec SHA1 (patch-ah) = 0b18b576be854935cb79cc3eb85848447ac17909 +SHA1 (patch-ai) = be9f59a6a2e84338d6df945ba5d10285d3205560 +SHA1 (patch-aj) = 7f2b3f1eaadfc3a71169d16010375eaf0ce96b46 +SHA1 (patch-ak) = 4d7807168b4fa9e3d497c943f45892e6d574ef9d diff --git a/devel/id-utils/patches/patch-ai b/devel/id-utils/patches/patch-ai new file mode 100644 index 00000000000..add49bd9234 --- /dev/null +++ b/devel/id-utils/patches/patch-ai @@ -0,0 +1,39 @@ +$NetBSD: patch-ai,v 1.1 2001/09/19 08:57:07 joda Exp $ + +--- src/lid.c~ Wed Sep 19 10:03:44 2001 ++++ src/lid.c Wed Sep 19 10:38:49 2001 +@@ -34,7 +34,6 @@ + #include "xstring.h" + #include "error.h" + #include "pathmax.h" +-#include "xalloca.h" + #if HAVE_LIMITS_H + # include <limits.h> + #endif +@@ -557,7 +556,7 @@ + line[0] = ' '; /* sentry */ + while (*flinkv) + { +- char *file_name = ALLOCA (char, PATH_MAX); ++ char file_name[PATH_MAX]; + FILE *gid_FILE; + + maybe_relative_file_name (file_name, *flinkv++, cw_dlink); +@@ -569,7 +568,7 @@ + } + + line_number = 0; +- while (fgets (&line[1], sizeof (line), gid_FILE)) ++ while (fgets (&line[1], sizeof (line) - 1, gid_FILE)) + { + line_number++; + if (pattern) +@@ -768,7 +767,7 @@ + + for (count = 0; *flinkv; count++, flinkv++) + { +- char *file_name = ALLOCA (char, PATH_MAX); ++ char file_name[PATH_MAX]; + maybe_relative_file_name (file_name, *flinkv, cw_dlink); + if (strcasestr (file_name, pattern)) + return count; diff --git a/devel/id-utils/patches/patch-aj b/devel/id-utils/patches/patch-aj new file mode 100644 index 00000000000..8047e36f6e3 --- /dev/null +++ b/devel/id-utils/patches/patch-aj @@ -0,0 +1,21 @@ +$NetBSD: patch-aj,v 1.1 2001/09/19 08:57:07 joda Exp $ + +--- src/fid.c~ Wed Aug 7 05:22:14 1996 ++++ src/fid.c Wed Sep 19 10:20:47 2001 +@@ -26,7 +26,6 @@ + #include "error.h" + #include "pathmax.h" + #include "xmalloc.h" +-#include "xalloca.h" + + int get_file_index __P((char *file_name)); + int is_hit __P((unsigned char const *hits, int file_number)); +@@ -203,7 +202,7 @@ + struct file_link **members; + struct file_link **end = &members_0[idh.idh_files]; + struct file_link *fn_flink = 0; +- char *file_name_buf = ALLOCA (char, PATH_MAX); ++ char file_name_buf[PATH_MAX]; + int has_slash = (strchr (file_name, '/') != 0); + int file_name_length = strlen (file_name); + int idx = -1; diff --git a/devel/id-utils/patches/patch-ak b/devel/id-utils/patches/patch-ak new file mode 100644 index 00000000000..207d0df3289 --- /dev/null +++ b/devel/id-utils/patches/patch-ak @@ -0,0 +1,30 @@ +$NetBSD: patch-ak,v 1.1 2001/09/19 08:57:07 joda Exp $ + +--- src/mkid.c~ Tue Jul 9 06:19:09 1996 ++++ src/mkid.c Wed Sep 19 10:21:00 2001 +@@ -33,7 +33,6 @@ + #include "hash.h" + #include "scanners.h" + #include "error.h" +-#include "xalloca.h" + #if HAVE_LIMITS_H + # include <limits.h> + #endif +@@ -363,7 +362,7 @@ + { + if (fstat (fileno (source_FILE), &st) < 0) + { +- char *file_name = ALLOCA (char, PATH_MAX); ++ char file_name[PATH_MAX]; + maybe_relative_file_name (file_name, flink, cw_dlink); + error (0, errno, _("can't stat `%s'"), file_name); + } +@@ -372,7 +371,7 @@ + } + if (verbose_flag) + { +- char *file_name = ALLOCA (char, PATH_MAX); ++ char file_name[PATH_MAX]; + maybe_relative_file_name (file_name, flink, cw_dlink); + printf ("%d: %s: %s", member->mf_index, lang->lg_name, file_name); + fflush (stdout); |