ports/58567: [PATCH] benchmarks/rawio has a bug in commandline option parser
OOTOMO Hiroyuki
ootomo at za.wakwak.zom
Sun Oct 26 13:50:21 UTC 2003
>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 at 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;
More information about the freebsd-ports-bugs
mailing list