[PATCH] argp: Fix argp_help segfault with help filter

Colin Watson cjwatson at debian.org
Thu Feb 10 00:31:44 UTC 2011


* lib/argp-parse.c (__argp_input): Test state->pstate as well as state.
---
 lib/argp-parse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/argp-parse.c b/lib/argp-parse.c
index c884b89..44ce7d1 100644
--- a/lib/argp-parse.c
+++ b/lib/argp-parse.c
@@ -935,7 +935,7 @@ weak_alias (__argp_parse, argp_parse)
 void *
 __argp_input (const struct argp *argp, const struct argp_state *state)
 {
-  if (state)
+  if (state && state->pstate)
     {
       struct group *group;
       struct parser *parser = state->pstate;
-- 
1.7.2.3

Thanks,

-- 
Colin Watson                                       [cjwatson at debian.org]


------------=_1297298167-19725-0--



More information about the Pkg-grub-devel mailing list