projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f697125
)
[PATCH] Don't segfault on missing argument data
author
Jens Axboe
<jens.axboe@oracle.com>
Tue, 21 Nov 2006 12:15:10 +0000
(13:15 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 21 Nov 2006 12:15:10 +0000
(13:15 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
parse.c
patch
|
blob
|
blame
|
history
diff --git
a/parse.c
b/parse.c
index 869b3dbf8ba088d3147b0042c74d2618c278d815..8cd427a9f3ce2b6cf7547ce4822d8da614e7b82e 100644
(file)
--- a/
parse.c
+++ b/
parse.c
@@
-154,6
+154,11
@@
static int __handle_option(struct fio_option *o, const char *ptr, void *data,
char **cp;
int ret = 0, is_time = 0;
+ if (!ptr && o->type != FIO_OPT_STR_SET) {
+ fprintf(stderr, "Option %s requires an argument\n", o->name);
+ return 1;
+ }
+
switch (o->type) {
case FIO_OPT_STR: {
fio_opt_str_fn *fn = o->cb;