diff options
author | Martin Walch <walch.martin@web.de> | 2013-10-03 18:35:16 +0200 |
---|---|---|
committer | Yann E. MORIN <yann.morin.1998@free.fr> | 2013-10-08 23:52:16 +0200 |
commit | 503c823048e81cc85c0e9d8c297cc70203e335e5 (patch) | |
tree | 57ba53f9b59aadb6d97924ea36590f4ef396a22e /scripts | |
parent | 3381960031a13d1a1ec7bdef60f6a9931d500371 (diff) | |
download | kernel-common-503c823048e81cc85c0e9d8c297cc70203e335e5.tar.gz kernel-common-503c823048e81cc85c0e9d8c297cc70203e335e5.tar.bz2 kernel-common-503c823048e81cc85c0e9d8c297cc70203e335e5.zip |
kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len
The struct gstr has a capacity that may differ from the actual string length.
However, a string manipulation in the function search_conf made the assumption
that it is the same, which led to messing up some search results, especially
when the content of the gstr in use had not yet reached at least 63 chars.
Signed-off-by: Martin Walch <walch.martin@web.de>
Acked-by: Wang YanQing <udknight@gmail.com>
Acked-by: Benjamin Poirier <bpoirier@suse.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/menu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 9e69f1934836..db1512ae30cc 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -584,7 +584,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, for (j = 4; --i >= 0; j += 2) { menu = submenu[i]; if (head && location && menu == location) - jump->offset = r->len - 1; + jump->offset = strlen(r->s); str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); if (menu->sym) { |