diff options
author | jkh <jkh@FreeBSD.org> | 2000-02-13 21:11:28 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2000-02-13 21:11:28 +0000 |
commit | 2d7b768a184b1925939a5e3f34530dfa3e2a94d0 (patch) | |
tree | dbbc86ca3d496784aae8fbf81aa050533a476471 /usr.sbin | |
parent | fb03f43d16a2992571ed44b1b0bf6915a6cc283a (diff) | |
download | FreeBSD-src-2d7b768a184b1925939a5e3f34530dfa3e2a94d0.zip FreeBSD-src-2d7b768a184b1925939a5e3f34530dfa3e2a94d0.tar.gz |
Increase the size of the various index variables; there was
some overflow occurring.
Submitted by: steve
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sysinstall/index.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index 90f9dc0..2f29cc2 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -262,12 +262,12 @@ 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) { - char line[1024]; - char junk[256]; + char line[2048]; + char junk[511]; char *cp; int i; - i = readline(fp, line, 1024); + i = readline(fp, line, sizeof line); if (i <= 0) return EOF; cp = line; @@ -282,18 +282,18 @@ index_parse(FILE *fp, char *name, char *pathto, char *prefix, char *comment, cha if (index(cp, '|')) copy_to_sep(rdeps, cp, '|'); else - strncpy(rdeps, cp, 510); + strncpy(rdeps, cp, 1023); return 0; } int index_read(FILE *fp, PkgNodePtr papa) { - char name[127], pathto[255], prefix[255], comment[255], descr[127], maint[127], cats[511], deps[511]; + char name[127], pathto[255], prefix[255], comment[255], descr[127], maint[127], cats[511], deps[1024]; PkgNodePtr i; while (index_parse(fp, name, pathto, prefix, comment, descr, maint, cats, deps) != EOF) { - char *cp, *cp2, tmp[511]; + char *cp, *cp2, tmp[1024]; IndexEntryPtr idx; idx = new_index(name, pathto, prefix, comment, descr, maint, deps); |