PATCH: BPs for libio & stdio.
Ulrich Drepper
drepper@redhat.com
Tue Jun 27 12:14:00 GMT 2000
Greg McGary <greg@kayak.mcgary.org> writes:
> You had a problem with this patch when you saw it in weeks past. The
> problem I need to solve is that the bounds of a stdio FILE handle need
> to include the _IO_FILE_plus member vtable. The way the code is
> written now, the assorted stdio open functions return only the
> _IO_FILE portion, with vtable excluded, so later uses of the FILE*
> that want vtable get bounds violations. We need to return a
> _IO_FILE_plus* to the user on open, so that when the user passes it
> back to us it has the proper bounds for accessing vtable. This should
> be safe since _IO_FILE_plus and _IO_FILE always start at the same
> address.
It looks OK given that it is necessary.
> The patch below is minimally invasive, but uses more casts than
> I'd like. Changing _IO_{new_,old_,}file_init to accept
> _IO_FILE_plus* will help.
These are internal function so changing is possible.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-hacker
mailing list