buffer overflow from OpenBSD:

1.3 bitblit:
	Fixed potential buffer overflow
Obtained from: OpenBSD
This commit is contained in:
Warner Losh 1997-02-09 04:52:11 +00:00
parent 2de57f9bbb
commit a3d9131308

View File

@ -258,7 +258,8 @@ char *opt;
char *f;
char *o = t;
int l = strlen(opt);
strcpy(t, mnt->mnt_opts);
strncpy(t, mnt->mnt_opts, MNTMAXSTR - 1);
t[MNTMAXSTR - 1] = 0;
while (*(f = nextmntopt(&o)))
if (strncmp(opt, f, l) == 0)