summaryrefslogtreecommitdiff
path: root/devel/id-utils
diff options
context:
space:
mode:
authorjoda <joda@pkgsrc.org>2002-02-27 09:07:42 +0000
committerjoda <joda@pkgsrc.org>2002-02-27 09:07:42 +0000
commitc66126667447274a1b63e9ff03a399a962b1fd33 (patch)
treebe23f9c8db69c9ebbbee7a4011760259b28bbd72 /devel/id-utils
parent5f728effb1c3bc246badc6fba2a180a2ad72af4a (diff)
downloadpkgsrc-c66126667447274a1b63e9ff03a399a962b1fd33.tar.gz
get rid of the last few evil calls to alloca;
this fixes some stack overflow segfaults
Diffstat (limited to 'devel/id-utils')
-rw-r--r--devel/id-utils/distinfo5
-rw-r--r--devel/id-utils/patches/patch-ab94
-rw-r--r--devel/id-utils/patches/patch-am30
3 files changed, 123 insertions, 6 deletions
diff --git a/devel/id-utils/distinfo b/devel/id-utils/distinfo
index ebfdb9bfd7f..b8e6cb6bbab 100644
--- a/devel/id-utils/distinfo
+++ b/devel/id-utils/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.6 2002/01/31 13:49:21 mrg Exp $
+$NetBSD: distinfo,v 1.7 2002/02/27 09:07:42 joda Exp $
SHA1 (id-utils-3.2.tar.gz) = 14d96a2170745883d077fa8c436e4380f28951a5
Size (id-utils-3.2.tar.gz) = 388012 bytes
SHA1 (patch-aa) = 69cdce8f83d043ffabbec7639423e35a46a97175
-SHA1 (patch-ab) = bb079b1a82c500fcb93d45bdf0fbb14a3729c0cb
+SHA1 (patch-ab) = aee2109a3cce77022cf4611542130fadc3842063
SHA1 (patch-ac) = 9d3f9004bdb5ae7b5b0bedd477cb060d416220be
SHA1 (patch-ad) = cd13aea19f0ac5dcdc8695ce40b409ecb15b1ec0
SHA1 (patch-ae) = 3c3d118779b18bd91e2cd3ff88c3b47ec3236396
@@ -14,3 +14,4 @@ SHA1 (patch-ai) = be9f59a6a2e84338d6df945ba5d10285d3205560
SHA1 (patch-aj) = 7f2b3f1eaadfc3a71169d16010375eaf0ce96b46
SHA1 (patch-ak) = 4d7807168b4fa9e3d497c943f45892e6d574ef9d
SHA1 (patch-al) = 5ff628040e5f3c27263bded593deea57ad0847f5
+SHA1 (patch-am) = 137ffa727d505975b775c0a877f1ac9af9cf58a7
diff --git a/devel/id-utils/patches/patch-ab b/devel/id-utils/patches/patch-ab
index 6e8b4a8e8ca..3b9637bc41e 100644
--- a/devel/id-utils/patches/patch-ab
+++ b/devel/id-utils/patches/patch-ab
@@ -1,8 +1,25 @@
-$NetBSD: patch-ab,v 1.1 1999/09/25 04:06:42 mrg Exp $
+$NetBSD: patch-ab,v 1.2 2002/02/27 09:07:43 joda Exp $
---- libidu/walker.c.orig Thu Jul 18 06:43:41 1996
-+++ libidu/walker.c Sat Sep 25 13:36:51 1999
-@@ -116,6 +116,8 @@
+--- libidu/walker.c.orig Wed Jul 17 22:43:41 1996
++++ libidu/walker.c Wed Feb 27 09:57:28 2002
+@@ -33,7 +33,6 @@
+ #include "dynvec.h"
+ #include "scanners.h"
+ #include "pathmax.h"
+-#include "xalloca.h"
+
+ int walk_dir __P((struct file_link *dir_link));
+ struct member_file *get_member_file __P((struct file_link *flink));
+@@ -98,7 +97,7 @@
+ dirp = opendir (".");
+ if (dirp == 0)
+ {
+- char *file_name = ALLOCA (char, PATH_MAX);
++ char file_name[PATH_MAX];
+ absolute_file_name (file_name, dir_link);
+ error (0, errno, _("can't read directory `%s' (`.' from `%s')"), file_name, xgetcwd ());
+ return 0;
+@@ -116,6 +115,8 @@
continue;
flink = get_link_from_dirent (dirent, dir_link);
@@ -11,3 +28,72 @@ $NetBSD: patch-ab,v 1.1 1999/09/25 04:06:42 mrg Exp $
if (!(flink->fl_flags & FL_PRUNE))
walk_flink (flink, sub_dirs_vec);
}
+@@ -165,7 +166,7 @@
+ if ((old_flags & FL_TYPE_MASK)
+ && (old_flags & FL_TYPE_MASK) != (new_flags & FL_TYPE_MASK))
+ {
+- char *file_name = ALLOCA (char, PATH_MAX);
++ char file_name[PATH_MAX];
+ absolute_file_name (file_name, flink);
+ error (0, 0, _("notice: `%s' was a %s, but is now a %s!"), file_name,
+ (FL_IS_FILE (old_flags) ? _("file") : _("directory")),
+@@ -284,8 +285,8 @@
+ int alias_ancestry = symlink_ancestry (alias_link);
+ if (member->mf_lang_args != alias_member->mf_lang_args)
+ {
+- char *file_name = ALLOCA (char, PATH_MAX);
+- char *alias_file_name = ALLOCA (char, PATH_MAX);
++ char file_name[PATH_MAX];
++ char alias_file_name[PATH_MAX];
+ absolute_file_name (file_name, flink);
+ absolute_file_name (alias_file_name, alias_link);
+ error (0, 0, _("warning: `%s' and `%s' are the same file, but yield different scans!"),
+@@ -380,7 +381,7 @@
+ #if 0
+ if (member->mf_lang_args != args)
+ {
+- char *file_name = ALLOCA (char, PATH_MAX);
++ char file_name[PATH_MAX];
+ absolute_file_name (file_name, flink);
+ error (0, 0, _("notice: scan parameters changed for `%s'"), file_name);
+ member->mf_old_index = -1;
+@@ -418,7 +419,7 @@
+ {
+ if (strchr (args->la_pattern, SLASH_CHAR))
+ {
+- char *file_name = ALLOCA (char, PATH_MAX);
++ char file_name[PATH_MAX];
+ absolute_file_name (file_name, flink);
+ if (fnmatch (args->la_pattern, file_name, MAYBE_FNM_CASEFOLD | FNM_FILE_NAME) == 0)
+ return (args->la_language ? args : 0);
+@@ -622,7 +623,7 @@
+ int
+ chdir_to_link (struct file_link *dir_link)
+ {
+- char *to_dir_name = ALLOCA (char, PATH_MAX);
++ char to_dir_name[PATH_MAX];
+
+ if (current_dir_link == dir_link)
+ return 1;
+@@ -637,7 +638,7 @@
+ error (0, errno, _("can't chdir to `%s'"), to_dir_name);
+ else
+ {
+- char *from_dir_name = ALLOCA (char, PATH_MAX);
++ char from_dir_name[PATH_MAX];
+ absolute_file_name (from_dir_name, current_dir_link);
+ error (0, errno, _("can't chdir to `%s' from `%s'"), to_dir_name, from_dir_name);
+ }
+@@ -811,8 +812,10 @@
+ char *
+ maybe_relative_file_name (char *buf_0, struct file_link const *to_link, struct file_link const *from_link)
+ {
+- struct file_link const **to_link_vec_0 = ALLOCA (struct file_link const *, PATH_MAX/2);
+- struct file_link const **from_link_vec_0 = ALLOCA (struct file_link const *, PATH_MAX/2);
++ struct file_link const *to_link_vec_1[PATH_MAX/2];
++ struct file_link const *from_link_vec_1[PATH_MAX/2];
++ struct file_link const **to_link_vec_0 = to_link_vec_1;
++ struct file_link const **from_link_vec_0 = from_link_vec_1;
+ struct file_link const **to_link_vec = to_link_vec_0;
+ struct file_link const **from_link_vec = from_link_vec_0;
+ struct file_link const **from_link_end;
diff --git a/devel/id-utils/patches/patch-am b/devel/id-utils/patches/patch-am
new file mode 100644
index 00000000000..bd5275544d2
--- /dev/null
+++ b/devel/id-utils/patches/patch-am
@@ -0,0 +1,30 @@
+$NetBSD: patch-am,v 1.1 2002/02/27 09:07:44 joda Exp $
+
+--- libidu/fnprint.c~ Tue Jul 9 06:19:08 1996
++++ libidu/fnprint.c Wed Feb 27 09:56:56 2002
+@@ -19,7 +19,6 @@
+ #include <config.h>
+ #include <stdio.h>
+ #include "xstdlib.h"
+-#include "xalloca.h"
+ #include "xunistd.h"
+ #include "idfile.h"
+ #include "xstring.h"
+@@ -94,7 +93,7 @@
+ dlink = arg->fl_parent;
+ if (dlink && dlink != cw_dlink)
+ {
+- char *file_name = ALLOCA (char, PATH_MAX);
++ char file_name[PATH_MAX];
+ maybe_relative_file_name (file_name, dlink, cw_dlink);
+ fputs (file_name, stdout);
+ putchar ('/');
+@@ -109,7 +108,7 @@
+ printf (",%s}%s", root_name (arg->fl_name), suff_name (arg->fl_name));
+ else
+ {
+- char *file_name = ALLOCA (char, PATH_MAX);
++ char file_name[PATH_MAX];
+ maybe_relative_file_name (file_name, arg, cw_dlink);
+ fputs (file_name, stdout);
+ }