mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Initialize wide struct info.
Fixes 15381. Using wide character function is on byte oriented memstream is undefined behaviour. This behaviour was masked by not initializing wide struct info. We now initialize it to cause a predictable crash.
This commit is contained in:
@@ -661,6 +661,10 @@ _IO_no_init (fp, flags, orientation, wd, jmp)
|
||||
|
||||
fp->_wide_data->_wide_vtable = jmp;
|
||||
}
|
||||
else
|
||||
/* Cause predictable crash when a wide function is called on a byte
|
||||
stream. */
|
||||
fp->_wide_data = (struct _IO_wide_data *) -1L;
|
||||
#endif
|
||||
fp->_freeres_list = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user