diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-12-05 06:32:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-12-05 06:32:57 +0000 |
commit | dcf46b02b4c2eaaf673c009e505a0400ee96272d (patch) | |
tree | fa31586641e9804c97eae5e4f9b720195e694a55 | |
parent | 8c99d95569dd8f0184d094ffd9fd1483c7312b37 (diff) |
prettier range check
-rw-r--r-- | usr.sbin/memconfig/memconfig.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/memconfig/memconfig.c b/usr.sbin/memconfig/memconfig.c index bad4d096f25..0409c71b525 100644 --- a/usr.sbin/memconfig/memconfig.c +++ b/usr.sbin/memconfig/memconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memconfig.c,v 1.1 1999/11/20 11:22:54 matthieu Exp $ */ +/* $OpenBSD: memconfig.c,v 1.2 1999/12/05 06:32:56 deraadt Exp $ */ /*- * Copyright (c) 1999 Michael Smith <msmith@freebsd.org> * All rights reserved. @@ -224,7 +224,8 @@ setfunc(memfd, argc, argv) help("set"); break; case 'o': - if ((*optarg == 0) || (strlen(optarg) > 7)) + if (*optarg == 0 || + strlen(optarg) > sizeof(mrd.mr_owner)-1) help("set"); strcpy(mrd.mr_owner, optarg); break; |