[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#34953: Possible fix for this problem



I think that in libio/oldfileops.c, line 411 (_IO_old_file_sync),
delta should be type _IO_ssize_t, just like it is in _IO_new_file_sync.
It makes sense for delta to be a signed type, because of the
way it is used:

  delta = fp->_IO_read_ptr - fp->_IO_read_end;

read_ptr is supposed to be <= read_end, so delta is expected to be
negative.  Now that it gets passed to a seek function that takes
64-bit offsets, the distinction becomes important.

Jason Guntorpe told me that this is likely to fix the apt problem as well.
(He reduced apt to a very similar test case).

Richard Braakman


Reply to: