* grub-core/lib/posix_wrap/wchar.h (mbrtowc): Set pwc to zero to avoid

uninited variable.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-09 14:24:55 +01:00
parent d65f6b36de
commit 275568816c
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-02-09 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/posix_wrap/wchar.h (mbrtowc): Set pwc to zero to avoid
uninited variable.
2012-02-08 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mknetdir.in: Use . rather than source for POSIX

View file

@ -51,6 +51,9 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
n = 1;
}
if (pwc)
*pwc = 0;
for (ptr = s; ptr < s + n; ptr++)
{
if (!grub_utf8_process (*ptr, &ps->code, &ps->count))