* libc/stdlib/mbtowc_r.c (_mbtowc_r): Avoid dereferencing
NULL pointer.
This commit is contained in:
parent
f375b8d9f4
commit
43b44bc5ad
@ -1,3 +1,8 @@
|
||||
2001-06-08 Jonathan Larmour <jlarmour@redhat.com>
|
||||
|
||||
* libc/stdlib/mbtowc_r.c (_mbtowc_r): Avoid dereferencing
|
||||
NULL pointer.
|
||||
|
||||
2001-05-28 Nick Clifton <nickc@cambridge.redhat.com>
|
||||
|
||||
* libc/stdio/vfprintf.c (_VFPRINTF_R): Handle printf ("%#.0o",0)
|
||||
|
@ -68,9 +68,10 @@ _DEFUN (_mbtowc_r, (r, pwc, s, n, state),
|
||||
{ /* fall-through */ }
|
||||
else if (!strcmp (r->_current_locale, "C-SJIS"))
|
||||
{
|
||||
int char1 = *t;
|
||||
int char1;
|
||||
if (s == NULL)
|
||||
return 0; /* not state-dependent */
|
||||
char1 = *t;
|
||||
if (_issjis1 (char1))
|
||||
{
|
||||
int char2 = t[1];
|
||||
@ -87,9 +88,10 @@ _DEFUN (_mbtowc_r, (r, pwc, s, n, state),
|
||||
}
|
||||
else if (!strcmp (r->_current_locale, "C-EUCJP"))
|
||||
{
|
||||
int char1 = *t;
|
||||
int char1;
|
||||
if (s == NULL)
|
||||
return 0; /* not state-dependent */
|
||||
char1 = *t;
|
||||
if (_iseucjp (char1))
|
||||
{
|
||||
int char2 = t[1];
|
||||
|
Loading…
Reference in New Issue
Block a user