artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0aaa74
)
Fixed potential buffer overflow.
author
bitblt
<bitblt@openbsd.org>
Tue, 21 Jan 1997 17:14:42 +0000
(17:14 +0000)
committer
bitblt
<bitblt@openbsd.org>
Tue, 21 Jan 1997 17:14:42 +0000
(17:14 +0000)
usr.sbin/amd/amd/mount_fs.c
patch
|
blob
|
history
diff --git
a/usr.sbin/amd/amd/mount_fs.c
b/usr.sbin/amd/amd/mount_fs.c
index
dd8661e
..
3cd9b61
100644
(file)
--- a/
usr.sbin/amd/amd/mount_fs.c
+++ b/
usr.sbin/amd/amd/mount_fs.c
@@
-36,7
+36,7
@@
* SUCH DAMAGE.
*
* from: @(#)mount_fs.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_fs.c,v 1.
2 1996/04/03 14:13:05 dm
Exp $
+ * $Id: mount_fs.c,v 1.
3 1997/01/21 17:14:42 bitblt
Exp $
*/
#include "am.h"
@@
-255,7
+255,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)