Date: Sun, 26 Oct 2003 22:47:53 +0900 (JST) From: OOTOMO Hiroyuki <ootomo@za.wakwak.zom> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ootomo@za.wakwak.com Subject: ports/58567: [PATCH] benchmarks/rawio has a bug in commandline option parser Message-ID: <200310261347.h9QDlrL9006301@ccsf.homeunix.org> Resent-Message-ID: <200310261350.h9QDoIGx073903@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 58567 >Category: ports >Synopsis: [PATCH] benchmarks/rawio has a bug in commandline option parser >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 26 05:50:18 PST 2003 >Closed-Date: >Last-Modified: >Originator: OOTOMO Hiroyuki >Release: FreeBSD 4.9-RC i386 >Organization: >Environment: System: FreeBSD ccsf.homeunix.org 4.9-RC FreeBSD 4.9-RC #0: Sun Oct 26 17:36:45 JST 2003 root@ccsf.homeunix.org:/usr/obj/usr/src/sys/Sakura i386 Target-file-id: $Id: rawio.c,v 1.7 1999/07/21 02:10:09 grog Exp grog $ >Description: run rawio with -s option(size of raw disk device), as follows: % rawio -a -s 30029328k -v 1 /dev/ad4c returned: Invalid length specification: -v in source rawio.c, it skips parsing argument at one point. >How-To-Repeat: run with -s option. >Fix: --- rawio.c.diff begins here --- --- rawio.c.orig Sun Oct 26 22:12:39 2003 +++ rawio.c Sun Oct 26 22:22:29 2003 @@ -423,7 +423,7 @@ printf ("No arg to n flag\n"); break; } - filesize = sizespec (argv [++i]); + filesize = sizespec (arg); break; case 'S': --- rawio.c.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: >>> lines: 416-427 <<< case 's': if (argv [i] [2] != '\0') arg = &argv [i] [2]; else if (++i < argc) arg = argv [i]; else { printf ("No arg to n flag\n"); break; } filesize = sizespec (argv [++i]); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310261347.h9QDlrL9006301>