summaryrefslogtreecommitdiffstats
path: root/contrib/amd/amq
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1998-08-23 22:52:09 +0000
committerobrien <obrien@FreeBSD.org>1998-08-23 22:52:09 +0000
commit203b7d3a36b8e8be4852d4b82e69c57860efdfc3 (patch)
tree91aa7e9beeaea1d52c2661b5ab2d96dc3792d701 /contrib/amd/amq
parente0e79339cc48dfca7ab913bdeecf17b24b4e4e21 (diff)
downloadFreeBSD-src-203b7d3a36b8e8be4852d4b82e69c57860efdfc3.zip
FreeBSD-src-203b7d3a36b8e8be4852d4b82e69c57860efdfc3.tar.gz
* Check getopt()'s return with -1, not EOF
* protect a few potential buffer overflows Obtained from: NetBSD
Diffstat (limited to 'contrib/amd/amq')
-rw-r--r--contrib/amd/amq/amq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/amd/amq/amq.c b/contrib/amd/amq/amq.c
index 7fba9b1..bd81d4f 100644
--- a/contrib/amd/amq/amq.c
+++ b/contrib/amd/amq/amq.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq.c,v 5.2.2.1 1992/02/09 15:09:16 jsp beta $
+ * $Id: amq.c,v 1.1.1.1 1998/08/23 22:07:20 obrien Exp $
*
*/
@@ -54,7 +54,7 @@ char copyright[] = "\
@(#)Copyright (c) 1990 The Regents of the University of California.\n\
@(#)All rights reserved.\n";
#if __GNUC__ < 2
-static char rcsid[] = "$Id: amq.c,v 6.0 1997-1998/01/01 15:09:16 ezk $";
+static char rcsid[] = "$Id: amq.c,v 1.1.1.1 1998/08/23 22:07:20 obrien Exp $";
static char sccsid[] = "%W% (Berkeley) %G%";
#endif /* __GNUC__ < 2 */
#endif /* not lint */
@@ -330,7 +330,7 @@ main(int argc, char *argv[])
/*
* Parse arguments
*/
- while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:pP:TU")) != EOF)
+ while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:pP:TU")) != -1)
switch (opt_ch) {
case 'f':
flush_flag = 1;
OpenPOWER on IntegriCloud