Re: [Numpy-discussion] fromfile can segfault if data is corrupted

2009-12-18 Thread Charles R Harris
On Fri, Dec 18, 2009 at 3:58 PM, Travis Oliphant wrote: > > On Dec 15, 2009, at 12:28 PM, Charles R Harris wrote: > > > > On Tue, Dec 15, 2009 at 11:20 AM, Michael Droettboom wrote: > >> I just discovered a bug in fromfile where it can segfault if the file data >> is corrupted in such a way that t

Re: [Numpy-discussion] fromfile can segfault if data is corrupted

2009-12-18 Thread Travis Oliphant
On Dec 15, 2009, at 12:28 PM, Charles R Harris wrote: On Tue, Dec 15, 2009 at 11:20 AM, Michael Droettboom wrote: I just discovered a bug in fromfile where it can segfault if the file data is corrupted in such a way that the array size is insanely large. (It was a byte-swapping proble

Re: [Numpy-discussion] fromfile can segfault if data is corrupted

2009-12-15 Thread Charles R Harris
On Tue, Dec 15, 2009 at 11:20 AM, Michael Droettboom wrote: > I just discovered a bug in fromfile where it can segfault if the file data > is corrupted in such a way that the array size is insanely large. (It was a > byte-swapping problem in my own code, but it would be preferable to get an > exc

[Numpy-discussion] fromfile can segfault if data is corrupted

2009-12-15 Thread Michael Droettboom
I just discovered a bug in fromfile where it can segfault if the file data is corrupted in such a way that the array size is insanely large. (It was a byte-swapping problem in my own code, but it would be preferable to get an exception rather than a crash). It's a simple fix to propagate the