From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: Are lseek changes correct? 13 Jul 1998 07:39:31 -0700 Message-ID: <199807131422.KAA27088.cygnus.cygwin32.developers@kramden.cygnus.com> To: cygwin32-developers AT cygnus DOT com, sos AT prospect DOT com DOT ru >From: Sergey Okhapkin >Date: Mon, 13 Jul 1998 10:33:33 +0400 > >Wed Jul 8 15:05:10 1998 DJ Delorie > > * fhandler.cc (fhandler_base::lseek): Note lseek so that next > write() can check for the Win95 "gap" bug. > (fhandler_base::write): If Win95 and lseek past eof > followed by write, use WriteFile to force the "gap" to be filled > with zeros rather than left to the "undefined" data Win32 specifies. > (fhandler_base::fhandler_base): initialize check_win95_lseek_bug_. > * fhandler.h (class fhandler_base): Add check_win95_lseek_bug_ > for bug: when seek past EOF and write, win95 fills with random > data (security hole). > >Shouldn't check_win95_lseek_bug_ be saved in linearize and restored in >delinearize? Lseek() may be performed in parent, but write() - in execed >child. Nice catch, Sergey. This should be fixed in the next snapshot. It will be caught automatically (I hope) by my new, improved version of the linearize/de_linearize functions. -Chris