diff options
author | obrien <obrien@FreeBSD.org> | 1998-08-23 22:52:09 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1998-08-23 22:52:09 +0000 |
commit | 203b7d3a36b8e8be4852d4b82e69c57860efdfc3 (patch) | |
tree | 91aa7e9beeaea1d52c2661b5ab2d96dc3792d701 /contrib/amd/amq | |
parent | e0e79339cc48dfca7ab913bdeecf17b24b4e4e21 (diff) | |
download | FreeBSD-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.c | 6 |
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; |