summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2003-02-27 20:43:52 +0000
committersobomax <sobomax@FreeBSD.org>2003-02-27 20:43:52 +0000
commit63fd51fe66b651a65505f491ecd0155d5ae5b225 (patch)
tree2939c19c3206414acdfa2810947a379815d2ba04 /usr.sbin/sysinstall
parentcf1a19f6567a1313d078f738d40d99c4851cf854 (diff)
downloadFreeBSD-src-63fd51fe66b651a65505f491ecd0155d5ae5b225.zip
FreeBSD-src-63fd51fe66b651a65505f491ecd0155d5ae5b225.tar.gz
Increase size of the static buffer used to hold runtime dependency list
read from CD from 2k to 16k, because in the modern world of meta-packages (Gnome et al) the length of this list could easily owerflow limit causing strange things to happen, ranging from installation failure due to list truncation to complete stack trashing (there is very vague bounds checking). For example, x11/gnome2-fifth-toe runtime dependencies list is 2,418 bytes long. Due to obvious reasons, this is an immediate MFC candidate. Sponsored by: Porta Software Ltd MFC after: 1 day
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/index.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c
index e7a7d84..b7ef309 100644
--- a/usr.sbin/sysinstall/index.c
+++ b/usr.sbin/sysinstall/index.c
@@ -286,7 +286,7 @@ readline(FILE *fp, char *buf, int max)
int
index_parse(FILE *fp, char *name, char *pathto, char *prefix, char *comment, char *descr, char *maint, char *cats, char *rdeps, int *volume)
{
- char line[10240];
+ char line[10240 + 2048 * 7];
char junk[2048];
char volstr[2048];
char *cp;
@@ -324,7 +324,7 @@ index_parse(FILE *fp, char *name, char *pathto, char *prefix, char *comment, cha
int
index_read(FILE *fp, PkgNodePtr papa)
{
- char name[127], pathto[255], prefix[255], comment[255], descr[127], maint[127], cats[511], deps[2048];
+ char name[127], pathto[255], prefix[255], comment[255], descr[127], maint[127], cats[511], deps[2048 * 8];
int volume;
PkgNodePtr i;
@@ -699,7 +699,7 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended)
}
if (id && id->deps && strlen(id->deps)) {
- char t[2048], *cp, *cp2;
+ char t[2048 * 8], *cp, *cp2;
SAFE_STRCPY(t, id->deps);
cp = t;
@@ -740,7 +740,7 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended)
static void
index_recorddeps(Boolean add, PkgNodePtr root, IndexEntryPtr ie)
{
- char depends[1024], *space, *todo;
+ char depends[1024 * 16], *space, *todo;
PkgNodePtr found;
IndexEntryPtr found_ie;
OpenPOWER on IntegriCloud