1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

libio: freopen of default streams crashes in old programs [BZ #24632]

As seen with very old i386 GCC binaries.
This commit is contained in:
Florian Weimer
2019-06-12 14:48:33 +02:00
parent 744e829637
commit cfa611447b
3 changed files with 12 additions and 1 deletions

View File

@ -62,7 +62,7 @@ freopen (const char *filename, const char *mode, FILE *fp)
to the old libio may be passed into shared C library and wind
up here. */
_IO_old_file_close_it (fp);
_IO_JUMPS_FILE_plus (fp) = &_IO_old_file_jumps;
_IO_JUMPS_FUNC_UPDATE (fp, &_IO_old_file_jumps);
result = _IO_old_file_fopen (fp, gfilename, mode);
}
else