On 26.02.2012 20:12, Mike Gilbert wrote:
Running grub-mkimage --help triggers an infinite loop in
__argp_get_display_len. Backtrace attached.
Yes, I've just noticed it. I have a fix, just testing it.
The following change seems to resolve it; I wonder if it should be
applied to the other functions in argp-fmtstream.c?
=== modified file 'grub-core/gnulib/argp-fmtstream.c'
--- grub-core/gnulib/argp-fmtstream.c 2012-02-26 18:07:59 +0000
+++ grub-core/gnulib/argp-fmtstream.c 2012-02-26 19:04:10 +0000
@@ -133,7 +133,7 @@
size_t s;
s = mbrtowc (&wc, ptr, end - ptr,&ps);
- if (s == (size_t) -1)
+ if (s == 0 || s == (size_t) -1 || s == (size_t) -2)
break;
r += wcwidth (wc);
ptr += s;
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel