diff options
author | hubertf <hubertf@pkgsrc.org> | 2002-04-05 01:33:24 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 2002-04-05 01:33:24 +0000 |
commit | dcdeb66984ee6350f0ce6e5344e11433d07b1495 (patch) | |
tree | c4a1ed0c73e8b0eb45912129e448ff1d96b8ab31 | |
parent | 63cb10f32213c239c9ab34c5184696a9772f092b (diff) | |
download | pkgsrc-dcdeb66984ee6350f0ce6e5344e11433d07b1495.tar.gz |
Find another place where we can run out of memory, and print
some proper error message (instead of dumping core later)
-rw-r--r-- | sysutils/xdu/Makefile | 4 | ||||
-rw-r--r-- | sysutils/xdu/distinfo | 4 | ||||
-rw-r--r-- | sysutils/xdu/patches/patch-aa | 20 |
3 files changed, 21 insertions, 7 deletions
diff --git a/sysutils/xdu/Makefile b/sysutils/xdu/Makefile index 37549f84976..3cfa3aed381 100644 --- a/sysutils/xdu/Makefile +++ b/sysutils/xdu/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.6 2001/11/29 01:12:49 hubertf Exp $ +# $NetBSD: Makefile,v 1.7 2002/04/05 01:33:24 hubertf Exp $ # DISTNAME= xdu-3.0 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= sysutils x11 MASTER_SITES= http://sd.wareonearth.com/~phil/xdu/ ftp://ftp.arl.mil/pub/ EXTRACT_SUFX= .tar.Z diff --git a/sysutils/xdu/distinfo b/sysutils/xdu/distinfo index d56877d01f5..29f4b30c81b 100644 --- a/sysutils/xdu/distinfo +++ b/sysutils/xdu/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.3 2001/08/25 16:34:26 hubertf Exp $ +$NetBSD: distinfo,v 1.4 2002/04/05 01:33:25 hubertf Exp $ SHA1 (xdu-3.0.tar.Z) = 196e2ba03253fd6b8a88fafe6b00e40632183d0c Size (xdu-3.0.tar.Z) = 20114 bytes -SHA1 (patch-aa) = 6aa0a84e1f234e98356deaaf21fecc4f7ecd58e9 +SHA1 (patch-aa) = 05ec21899437eb15159615ce40e63e5e07073581 diff --git a/sysutils/xdu/patches/patch-aa b/sysutils/xdu/patches/patch-aa index a9d59f4e5e5..a9bfa9b71c4 100644 --- a/sysutils/xdu/patches/patch-aa +++ b/sysutils/xdu/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.2 2001/08/25 16:34:27 hubertf Exp $ +$NetBSD: patch-aa,v 1.3 2002/04/05 01:33:25 hubertf Exp $ --- xdu.c.orig Sun Jun 5 21:29:23 1994 +++ xdu.c @@ -55,7 +55,21 @@ $NetBSD: patch-aa,v 1.2 2001/08/25 16:34:27 hubertf Exp $ } fclose(fp); } -@@ -622,6 +630,7 @@ +@@ -290,7 +298,12 @@ + name++; + } + buf[indx] = 0; +- path[arg++] = strdup(buf); ++ path[arg] = strdup(buf); ++ if (path[arg] == NULL) { ++ fprintf(stderr, "Out of memory! (#3)\n"); ++ exit(1); ++ } ++ arg++; + path[arg] = NULL; + + addtree(&top,path,size); +@@ -622,6 +635,7 @@ 100.0*topp->size/rootp->size); } @@ -63,7 +77,7 @@ $NetBSD: patch-aa,v 1.2 2001/08/25 16:34:27 hubertf Exp $ char * strdup(s) char *s; -@@ -631,10 +640,15 @@ +@@ -631,10 +645,15 @@ n = strlen(s); cp = malloc(n+1); |