commit | a0741cbb98a0399d26e90cb05604bbfb20a45bc6 | [log] [tgz] |
---|---|---|
author | Jens Axboe <jens.axboe@oracle.com> | Fri Mar 05 12:46:37 2010 +0100 |
committer | Jens Axboe <jens.axboe@oracle.com> | Fri Mar 05 12:46:37 2010 +0100 |
tree | 31a767d794c3c42af571cffad4df4ae6d5442a00 | |
parent | 15dc1934435dc84d66547c4fc92d936224d7238f [diff] [blame] |
Fix parse strlen() bug Commit 38789b58775ee5e00f4669f01b3c9da31a7345e3 checks the wrong string, it's unitialized garbage. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/parse.c b/parse.c index d8527b5..9e3c5b1 100644 --- a/parse.c +++ b/parse.c
@@ -658,7 +658,7 @@ ssize_t nchr = OPT_LEN_MAX; size_t envlen; - if (strlen(in) + 1 > OPT_LEN_MAX) { + if (strlen(opt) + 1 > OPT_LEN_MAX) { fprintf(stderr, "OPT_LEN_MAX (%d) is too small\n", OPT_LEN_MAX); return NULL; }